Shop OBEX P1 Docs P2 Docs Learn Events
PIC16F84 interface with BS2... — Parallax Forums

PIC16F84 interface with BS2...

WhelzornWhelzorn Posts: 256
edited 2004-10-25 20:20 in BASIC Stamp
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

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2004-10-25 14:44
    You can connect BASIC Stamp pins to the pins of other micros ... but be careful. If both pins are made outputs, and one goes high while the other is low ... POOF. You may want to put a 1K resistor between the pins to prevent physical damage due to programming errors.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas Office
  • allanlane5allanlane5 Posts: 3,815
    edited 2004-10-25 15:07
    Oh, dear, that looks like a very limited programmer -- or maybe the write-up was limited, and the programmer is much more capable. Mike Predko sells an excellent PIC book which comes with a programmer board.

    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.
  • WhelzornWhelzorn Posts: 256
    edited 2004-10-25 15:33
    yes, that programmer is more capable. My uncle had it and it could handle most every PIC model, if not with a little bit of modification.

    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 WilliamsJon Williams Posts: 6,491
    edited 2004-10-25 15:43
    You should probably consult a PIC forum for questions regarding the PIC micro and programming it.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas Office
  • allanlane5allanlane5 Posts: 3,815
    edited 2004-10-25 15:47
  • WhelzornWhelzorn Posts: 256
    edited 2004-10-25 20:20
    ok, thank you for your responses
Sign In or Register to comment.