The underrated PIC10F200 (and 202/204/206 as well)
Sitting around looking through my collection of parts during a brief stint of illness I came across my stash of 30 or so PIC10F200’s. These were my entry into the world of microcontrollers. Granted I wasn’t very good at electronics (and probably still not very good) and I found the lowest end microcontroller i could in order to understand them on a more fundamental basis. I found all of the peripherals on other microcontrollers to be a distraction and complicating factor from what I wanted to learn.
Nowadays, delving into 32bit architectures and whatnot, I’ve forgotten about the little MCU’s. Thinking about it they’re still incredibly useful in a myriad of circumstances. Only costing 59 cents or 30 cents at volume, and running at 4Mhz internally these have an amazing range of uses.
Consider the lowest end of the low end, the 10F200. Now it only has 256 words (12-bit wide instructions) and 16 bytes of RAM. It has 3 I/O and one input only pin. Now in a world of Arduinos and large pin count microcontrollers running at 40+Mhz , it may seem like this thing has no use but I beg to differ.
Today I was tinkering around with the little unit today and I was recalling some of the things I imagined I could do with the limited hardware. So today I wanted to see how well it could produce sound. Now this little thing is trivial for most MCU’s, simply output an appropriate square wave. My goal though was to produce a warble and program it in a C compiler. This was very easy and achievable.
Now, granted, it’s not a very complicated circuit, but I found it to work admirably. The compiled code took up only 36% of the ROM and 38% of the RAM. That’s with 2 16 bit counters and an 8 bit function variable. it also used delay functions. Of interest to note though, I tried using floats, no go, the libraries filled up the ROM like boom!
Anyways, here are some used I dreamed up for the PIC10F200 over the years. They are mostly in support roles but I think they’re equally as useful as any other role within a project, especially given the MCU’s small footprint and low price. The applications I’ve thought up are as follows, keep in mind we only have 3 IO and one input.
- A dice game: I actually created a prototype of this some time ago based on the idea that this would be my business card. It was simply a set of multiplexed LED’s (six in total) on a PCB that would show like the face of a dotted die. one input was used and the other three were for the IO. Bringing the IO to an input mode would turn off the leds.
- Two button debouncing: Using a microcontroller for debouncing has been my favorite way to debounce inputs on a button. By using an internal count on the MCU you can simulate a charging/discharging capacitor and provide threshold values to simulate a ‘dead zone’
- A little robot: Using the two output for motor control and the two inputs for sensing, you could potentially make a simply robot. the only problem with it may be the limited ROM for logic routines, but I suppose that’s the challenge.
- Timer Lamp: The 10f200 has just enough IO for two buttons and two outputs (I = On/off, I=Timer function, O= LED out, O=Relay for lamp). my old project with a timer lamp was done with a PIC16F505 (a limited MCU in its own right) but the 10F200 would’ve done the job quite admirably.
- Dimmers on AC lamps: This example is used by microchip extensively to promote the device, it is one of the many uses of this device.
- Sound generation: Like I did today, it seems like a pretty worthwile use of the chip. Cheap and easy. small size also helps with the surface mount varieties.
- One-wire wake up: You could use it as a separate node to watch a data line for signalling on the one-wire protocol. I have used this to fire up LED’s in a specified pattern and duration. With the SOP package tou can solder it directly to the LED and data line in a bizzaro single package.
Anyways, the uses are endless for such a limited but inexpensive device. I have no idea why such a limited device captivates my imagination but perhaps it’s the small size that makes it interesting and uncomplicated design and use.
So, for your troubles of reading a wall of text. Here’s a neat photo of an old diode for your perusal.
Quite a nice little read (love the diode! lol).
I’m currently using one of these teeny tiny things as a err ‘ROM’ cartridge for a small games console i am developing. Granted, its certainly not a ROM, but thanks to the PIC’s Harvard design, i had to invent a protocol where the game logic runs inside the cart, and it tells the main unit what to display and ask’s it for button inputs etc.
This little chip just about has the needed IO for the SPI i’m using to accomplish this. Sadly though, i am just about out of both ROM & RAM space on the 10F200 for just the protocol and cartridge metadata before any game logic can fit on!
Too bad, i might have to dump it in favor of a PIC12 or similar, but its been such a useful little development chip 🙂
I can certainly vouch for its signal listening/sending capabilities though! This cute thing can pump some decent bi-directional I/O if you purpose it right 🙂