| Chosing a microcontroller for this project |
| Miércoles, 12 de Julio de 2006 00:00 |
|
After experimenting some time with an alternative to rebuild a rubber-version Spectrum keyboard membrane from scratch, I wanted to do the same with the Plus membrane. The philosophy is the same, but the making was too hard: the Plus membrane has not two, but four circuits and two inner layers to isolate them. This is necesary to be able to simulate the closing of two independent circuits with a single key operation. The Plus cabinet has enough room, at both sides, to fit small PCB's. Besides, the cabinet can be drilled to expose connectors to the outside. I took some measures and went to one of my department labs to take two microcontroller trainers: one from Microchip and another one from Silicon Labs.
At first I were intented to use Micrchip's as the PIC is very popular in Spain. However, after taking a closer look at Silicon Labs specifications, I realize there was no place for comparisons: Silicon Labs medium-low class chips are almost equivalent to high-class PIC's. Low class Silicon Labs microcontrollers start with 12 MHz clock and high class reach 100 MHz.. Besides, the IDE and debugging facilities, with no waste of internal resources on the chip during debug sessions, and above all, the fact that many people in my lab were using the Silicon Labs chip and encouraged me to use it instead of Microchip's, helped me to take my final decision.
Microchip's trainer contents.
Silicon Labs trainer contents Another thing in favour of Silicon Labs is one leaflet, that you can see in the photo, behind the install CD, were you are guided in a few steps from nothing, to have a complete program up and running in less than five minutes. I learnt the basics of this MCU very quickly. Thus, the proposed interface is based on a model C8051F343 microcontroller from Silicon Labs, although the PCB is compatible with another one, the C8051F320. Both are 8051-core based, with 25 I/O lines, USB slave interface (which we will not use), and support for SPI, UART, timers, etc.. They work at 3.3 V, which makes it very suitable for interfacing with memories SD / MMC, and yet can manage TTL levels. The difference between the two is that the F343 can reach 48 MHz clock frequency, and has 4KB of XRAM, and the F320 reaches 25 MHz with 2KB of XRAM. The firmware written for this microcontroller uses only 256 bytes of XRAM, and a few positions of direct RAM. They have a built-in oscillator, so does not need quartz crystal to work at 25 or 48 MHz. In fact, the final design there's only one active component, the microcontroller, being the rest resistors and capacitors. The Silicon Labs development kit I was using to the date is based on a CAN bus enabled chip, which I don't use. The IDE allows assembler and C. Assuming I would have to deal with precisse timings, I chose assembler, and a home-made devkit based upon the F320.
Original development kit, featuring the F040 (CAN bus enabled), home-made F320 dev kit, and PCB for the keyboard interface, with the F343.
C8051F320 devkit and JTAG adapter, for program downloading and debugging. One of the advantages of F320 (and of F343 since both have the same pinout) is still being a 3.3 V device, they don't need a external voltage regulator to get it working. Instead, they can be fed with 5V, converting to 3.3V internally. This is because these micros are designed to be used in USB applications, which gives 5V over the USB wire to feed the device. The devkit used in the initial tests, in fact, is fed from the PC with a USB cable, which only used two pins for supply. |





