Slave Coprocessor for BS2e?
Hi all,
Can anyone help with some·code for setting up a PIC 16F84-A as a slave coprocessor to a BS2-e chip?
I'm using PBasic 2.5 with the BS2-e.· I have a reasonable understanding of PBasic, including the SERIN and SEROUT commands, but only a very basic understanding of "bit banging" and asynchronous serial communication.·
I'm using a Velleman P8048 programming board for the PIC chip and·MPLAB IDE·as the editor.· I don't have PIC BASIC software, so I'm using the language and syntax specified in the manufacturer's datasheet.· I realise it would be easier to use a BS2 as a coprocessor but I'm limited to the footprint of the 16F84A.· The existing socket is already connected to the BS2-e.· The 16F84A is the only coprocessor attached.
On the PIC, pin 3 (RA4) is connected to P8 (pin 13, network pin) on the stamp, pin 4 (MCLR) is connected to pin 22 (Reset), pin 5 (Vss) is·connected to ground, pin 14 (Vdd)·to pin 21 (+ 5 v), and pins 15 (OSC2) and 16 (OSC1)·to a 4 Mhz XTAL·circuit.· I've jumpered the PIC socket to a breadboard for testing purposes, pin for pin.··RA0 to RA3 and RB1 to RB7 are open for use.· The power supply is approx. 10.8 V DC with a regulated 5v·to Vdd.· The relevant protection resistors etc are in place.· I'd·include the schematic but it is copyrighted.
My initial target is simply to set up a programme that returns an "acknowledged" character to the PBasic debug screen when it lights up a led attached to RA0.· I should be able to decipher the rest from there.
I already have some sample code written for a BS2 with a PIC16F84, but I don't have the knowledge (yet) for translating this to·a BS2-e with a PIC 16F84A.
Any help would be greatly appreciated!
·
Can anyone help with some·code for setting up a PIC 16F84-A as a slave coprocessor to a BS2-e chip?
I'm using PBasic 2.5 with the BS2-e.· I have a reasonable understanding of PBasic, including the SERIN and SEROUT commands, but only a very basic understanding of "bit banging" and asynchronous serial communication.·
I'm using a Velleman P8048 programming board for the PIC chip and·MPLAB IDE·as the editor.· I don't have PIC BASIC software, so I'm using the language and syntax specified in the manufacturer's datasheet.· I realise it would be easier to use a BS2 as a coprocessor but I'm limited to the footprint of the 16F84A.· The existing socket is already connected to the BS2-e.· The 16F84A is the only coprocessor attached.
On the PIC, pin 3 (RA4) is connected to P8 (pin 13, network pin) on the stamp, pin 4 (MCLR) is connected to pin 22 (Reset), pin 5 (Vss) is·connected to ground, pin 14 (Vdd)·to pin 21 (+ 5 v), and pins 15 (OSC2) and 16 (OSC1)·to a 4 Mhz XTAL·circuit.· I've jumpered the PIC socket to a breadboard for testing purposes, pin for pin.··RA0 to RA3 and RB1 to RB7 are open for use.· The power supply is approx. 10.8 V DC with a regulated 5v·to Vdd.· The relevant protection resistors etc are in place.· I'd·include the schematic but it is copyrighted.
My initial target is simply to set up a programme that returns an "acknowledged" character to the PBasic debug screen when it lights up a led attached to RA0.· I should be able to decipher the rest from there.
I already have some sample code written for a BS2 with a PIC16F84, but I don't have the knowledge (yet) for translating this to·a BS2-e with a PIC 16F84A.
Any help would be greatly appreciated!
·


Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
So you SHOULD be able to use the BS2 program, IF you adjust the baud-mode constants.
Edit: Oops, apparently what I said is not true -- see the following post.
Post Edited (allanlane5) : 1/21/2008 9:04:05 PM GMT
Since you're already familiar with the Stamp, take a look at the PIC Source Book by guru Scott Edwards.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com