RS 232 Bit Banging PIC to PIC
Posted: Mon Feb 02, 2009 7:48 pm
Downloaded Bit Banging RS232 Data out and Data in from the Matrix examples site.
Slightly changed Data out to suit 8 bits input. This seems to work spot on as with one start bit (0) 8 data bits and one stop bit (1).
Had my scope on this and seems perfect. Timing also looks correct.
The problems are Data in. If I input up to 3 in data out then data out gives a running light effect on the eight outpur bits.
More than 3 I get a a steady output that will repeat, however it's nothing like the input in data out.
For instance if I have bcd serial code of 7 out of data out PIC I get 41 out of the data in PIC. For a bcd in of say 15 I get out 205.
This is fully repeatable ? If I input say 7 then I expect 7 out.
Although I have slightly altered data out PIC from the examples (to facilitate 8 input bits and with different PIC 16F873) this seems to work perfectly according to my scope.
However I've not changed the Data In PIC (only chip to 16F873). This is exactly as the examples from the Matrix page? The baud rate seems correct from data out and both clock speeds are 19660800.
I'm fully reliant on the macro's provided and if I'm honest I don't fully understand these as I can't look into them. As stated the data out works straight out of the box as it were but the data in (BCD out) I just can't get to work.
I've no idea regarding C code or similar I've always managed to date with Flowcode. I trying to understand serial comms and I'm very near. To me this seems some sort of timing issue. Can anyone at Matrix put me straight?
Slightly changed Data out to suit 8 bits input. This seems to work spot on as with one start bit (0) 8 data bits and one stop bit (1).
Had my scope on this and seems perfect. Timing also looks correct.
The problems are Data in. If I input up to 3 in data out then data out gives a running light effect on the eight outpur bits.
More than 3 I get a a steady output that will repeat, however it's nothing like the input in data out.
For instance if I have bcd serial code of 7 out of data out PIC I get 41 out of the data in PIC. For a bcd in of say 15 I get out 205.
This is fully repeatable ? If I input say 7 then I expect 7 out.
Although I have slightly altered data out PIC from the examples (to facilitate 8 input bits and with different PIC 16F873) this seems to work perfectly according to my scope.
However I've not changed the Data In PIC (only chip to 16F873). This is exactly as the examples from the Matrix page? The baud rate seems correct from data out and both clock speeds are 19660800.
I'm fully reliant on the macro's provided and if I'm honest I don't fully understand these as I can't look into them. As stated the data out works straight out of the box as it were but the data in (BCD out) I just can't get to work.
I've no idea regarding C code or similar I've always managed to date with Flowcode. I trying to understand serial comms and I'm very near. To me this seems some sort of timing issue. Can anyone at Matrix put me straight?