PIC 16F628A & 16F627A programming
|( 1 / 1 )|
|( 1 / 1 )|
This weekend I noticed the RCD programmer had a completely different design in charge pump than JDM programmers. So I took another shot at building my DIY programmer hardware. Having bad experiences with soldering away the other 2 programmer schematics (and then noticing them not working properly due to bad schematics). I started humbly making RCD programmer on my breadboard. After a few hours of testing it did not work at all.
This morning I looked at the programmer schematic once more and then read a little about the programming specs of the 16f628 and 16f627a. And noticed a missing connection in my breadboard implementation to the PGM pin (pin 10 on the pic socket). Amazingly enough when I connected the final lead and pressed 'program all' in IC-Prog the RCD programmer worked flawlessly.
I tested programming some hexfiles like the wisp628 firmware and a couple of my own compiled hex files using the CC5X compiler. Conclusion stable C-programming for PIC's finally available to the DIY people like me with little electronics background but a whole lotta interest . And this on my pretty recent motherboard and using the 628A and 627A's (which has a low serial port voltage but has no problams programming due to the better designed rcd charge pump to generate the required MCLR voltage).
Anyway so excited about this that I posted some quick pictures. Let the pic chip programming begin !
Here is a simple test circuit I used to test my first JAL program :
here is my implementation running on breadboard:
The cc5x compiler is nice but I prefer JAL (jet another language) because cc5x is proprietary and also with the free/student version you are limited to 1024k and cannot produce commercial hex files. JAL compiler is GPL and you are allowed to write commercial code with it. Here is some code which flashes an SOS signal : flashled.jal
Jal compiler + flashled source code + makefile (300K). Just run make.bat and program hex with icprog.exe).
A demo showing off my first bug written for a PIC when I wrote the second for loop so that
it iterates 4 times instead of 3 needed for an SOS signal (bug is corrected in the .zip above ofcourse ):
Here is how to connect 2 dc motors (less than 200mA) to the pic :
pwmbug.zip hex file for the pwmbug
Here is an implementation found :
Now where to get these dc motors with no more than 100mA current use ? Some say mobile phone vibrate motors are ideal... Also found an interesting 600mA motor but this will require larger transistors which can handle 600ma when motor is stalled.
Ok got jal and pic burning to work under linux.
The burning to pic is a bit unstable in linux (it uses picprog which is really fast, sometimes a bit too fast even with --slow option so you have to run it multiple times for it to work properly).
flashled_linux.tar.gz : 900k also includes the windows files. Just run 'make' than 'make burn'