PIC16F84 interface with BS2...
Whelzorn
Posts: 256
Well, here we go with another of my unusually strange projects using the BS2...
anyway, as the title mayhave depicted, I want to use several PIC16F84's, and have them output data which the basic stamp can store in ram, send to another of the PIC's and have it calculate the final output. My uncle has done this before and I am trying to replicate it, but I have some questions about the PIC's I'm using. I purchased a programmer kit:
·http://www.ramseyelectronics.com/cgi-bin/commerce.exe?preadd=action&key=PIC1
and am wondering: If it says it can program a PIC16F84, does that mean it can program a PIC16F84A-20/P? also, can the BS2 read output from a pin of one of these directly, or would I have to route it through a transistor?
thanks for your help,
Justin
edit: BTW the PIC16F84A-20/P I would be ordering from jameco.com
anyway, as the title mayhave depicted, I want to use several PIC16F84's, and have them output data which the basic stamp can store in ram, send to another of the PIC's and have it calculate the final output. My uncle has done this before and I am trying to replicate it, but I have some questions about the PIC's I'm using. I purchased a programmer kit:
·http://www.ramseyelectronics.com/cgi-bin/commerce.exe?preadd=action&key=PIC1
and am wondering: If it says it can program a PIC16F84, does that mean it can program a PIC16F84A-20/P? also, can the BS2 read output from a pin of one of these directly, or would I have to route it through a transistor?
thanks for your help,
Justin
edit: BTW the PIC16F84A-20/P I would be ordering from jameco.com
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office
The 16F84 is becoming deprecated. It was a very popular, small PIC (18 pins) for a long time, so lots of tutorials were written for it. The 16F628 is compatible in every way -- except it's cheaper, has more RAM memory, and has more flash PROM memory.
You'll need to write your program in assembly (free from MicroChip) or some other high level language -- I'm fond of www.picant.com/c2c as a C subset compiler (they have Pascal too) or there are several Basic versions. You'll need a Serial port library on the 16F84 side to understand what the BS2 is sending it. This 'comes-with' C2C, and every Basic compiler I've seen.
Yes, a BS2 can talk directly to it. You should put a 220 ohm resistor in-line between the pins. The reason for this is that if two outputs try to drive each other (accidentally) and one drives low and the other drives high (again, accidentally) then you can burn out the drivers behind one of the pins. A 220 ohm resistor between the two pins reduces the current in this circumstance so that neither pin will be harmed, while still allowing full-speed signaling.
Anyway, thank you everyone for your responses, and only one question remains:
will a 16F84 programmer work for a 16F84A-20/P? I am obviously new to this, so I·do not really know the difference, other than the 20mHz·capability of the 20/P. (apologies for the simple question ;-) )
thanks again,
Justin
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office