Due to a mistake on the part of a customer, we wound up with a large number of PIC 18F6520
cpus. He should have gotten the LF version for his application, a body-worn visio-tactile
hearing aid prosthetic for the profoundly deaf infant (whew, but it was a cool thing).
Being cheapskates, we
didn't want all these to go to waste, they are nice chips, and fun to program.
So we laid out a board to make them easy to use in projects around the place.
The idea here is to do the tough part for most hobbyists, eg lay down the SMD
parts, and have a footprint the normal electronics
hobby person can easily handle -- a 40 pin dip. The above also include us -- even
though we can, not everything we do deserves going through the tedium
of laying out and making a dedicated PCB. The motherboard allows for a little
playing around, and in-circuit programming, but is not needed for applications.
We have also done some
preliminary work on daughter boards that contain (respectively) EEPROM in bulk, 24 bit a/d
converters, and CMOS power boosters that can put out AMPERES when used to boost
say, a PWM output from the PIC. This can drive a stepper motor, a speaker, whatever.
We have even used an A/D input with a microphone and a PWM output with a speaker to
make a tiny class-D PA amplifier. Just a goofy proof of concept, but it DID work well,
within the limitations of 10 bits. With two pwm booster circuits, one can get 10v pk-pk
outputs...a fair amount of power (30W or so).
Thanks very much to Dale Jorgensen for doing the PCB layout and various other parts of this project, especially the excellent documentation.
We have used these with most of the major toolsets, and favor either the
CCS or HiTech
C compilers for using them. A bit pricey, we know, but they are both very good tools
for this kind of work, and most of the rest of the stuff out there stinks badly by
comparison. HiTech rules for mixed C and ASM when you really need every last cycle
the chip can manage. They had the very best, even amazing, PIC16 compiler for quite
awhile, and are working on a new pic18 version they hope will be as good. We're watching the
beta bug reports before upgrading, however, as it's very pricey.
CCS rules for ease of use, working examples, and easy and
very slick hookup to all the interrupts at a very small cycle penalty (using their dispatcher).
Both are good at optimization, one maybe a little better than the other, depending
on the exact code fed to them. All the other tools we've tried frankly stink bigtime.
Some force you into their model, no good if you've got your own (presumably better) one, some
aren't even interrupt (thread) safe, or just hard to use and crashy and as far as I'm concerned,
someone even owes me my $300 back. So I'd go with
either CCS or HiTech. Right now we're using the CCS tool-set and really liking it.
The logger board is complete and can be used standalone. It contains two crystals, one 10MHz for the main clock at either 10 MHz or 40 MHz with the built in PLL, and the other your basic 32768 Hz for real time clock uses. You can also direct the PIC to use this as the main clock in software for very low power modes, where the system draws only a few uA. The board also contains a 2 channel rs-232 converter that in addition to the main function, puts out the +/- 9v it generates so you can use it to power things like low power opamps in your project, which only needs +5v input.
![]() The motivation for doing this, other than pure cheapness was, errrm, cheapness. Doug wanted to use these as data loggers in the Fusion setup, as they are inexpensive to replace should some errant EMP fry one. This has been a problem with the over billion watt pulses we sometimes play with, and a PC is plain old expensive and hasseliferous to replace. Even if we cook one of these, there's a better than even chance that the EEPROM I2C daughter-board still has the data on it, which could be read elsewhere. |
![]() The eeprom board was made on our PCB line, which doesn't yet do plated through holes, so Dale put all the chips on one side, and only ran power and ground on the other, soldering through wires where power/ground vias would be. This could obviously be reduced in size later on when we make a layout for a real PCB house. This board gives 64kx8 of byte-writeable eeprom on the I2C bus. The idea is to have it pluggable, like a key-flash drive, so it can be used for much the same set of purposes, only less expensive. I used the same stakes as for the comm and LCD on the logger board, so as to have all using the same connectors, cheapness again. |
![]() |
![]() |
CPU: PIC 18f6520 @ 40 MHz, but nearly any 64 pin PIC would fit and work, they are nice that way.
I/O: Most pins brought out to 40 dip pins. Both UARTs converted to RS-232 on board and brought out
to a seperate 2x5x.1 spacing connector. Most of port E brought out to another top connector for
driving LCD's or whatever else you want. Power brought to this connecter as well. I2C and MCLR pullups on board.
One red LED also on board. All the other port pins are unencumbered and run to the 40p dip header.
Speeds: CPU can software-select either 10 MHz crystal with or without the 4x PLL, or a 32 KHz one.
Power consumption: Usually 30 mA or so at 5v nominal and full speed, depends on speeds and loads. Can be as low as
a few uA for CPU + about 1 mA for the RS-232 converter. Next rev will allow for multiple
LCD displays and switching off the RS-232 chip when it is not needed, at the cost of reserving one I/O pin to do that.
You'll want to get the data sheet for the PIC at Microchip. Again, nearly any PIC in this 64p flatpack package will work on this board. Pinouts tend to be interchangeable enough. Since we don't regulate the power on board, lower voltage ones should work fine. The RS-232 chip is rated down to 3 volts.
Stay tuned -- more to come. I'd originally done this for my own uses, and perhaps some of the people on the Fusor forum, at least the few who don't think of this stuff as "rocket science" or "not worth the time and effort". Here these will be used to log data from and control parts of the Fusion setup, the solar power stuff, the weather station, burgler alarm, and whatever else I can think of. Turning the cheap-but-effective single speed spot welder I got at Harbor Freight into a more useful timed-pulse (for preheat and post-anneal) machine just came to mind...
There is a chance we will product-ize this and hopefully find someone to make and sell them for us. We don't like being in the hardware business ourselves; we prefer to write outstanding software for great platforms. Do you hear me PaulB, JackM? Be a nice little product for ya'll, or a good basis. Else I will open-source the whole thing soon.
Here's how to contact us: