Serial communication with PIC12F675

Status
Not open for further replies.
mnavarrete1@sbcglobal.net said:
I am doing something similar with a rfPIC12F675, bit-banging and a GPS module. Its not working yet, but does anyone have any recommendations?

If you've got access to a double beam scope, mod the program so it output a short pulse as it reads each bit, then compare the pulses and the incoming data using the two scope beams. This provides a nice visual indication of how accurate your timing is - each pulse should be in the middle of each bit, although it will work as long as each pulse in in the correct bit.

As before, are you sure the internal oscillator is calibrated correctly?.
 
I don't understand what Nigel is saying. If, whenever I receive a bit I output a pulse, it will always be within the received pulse no matter what speed it is running at. Can someone explain how this helps more than just looking at the received waveform.

Mike.
 

To receive RS232 you wait for a start bit, then delay 1/2 a bit time, check you're still in the start pulse (send first test pulse out here), then delay 1 full bit time and read the first bit (send second test pulse here), repeat seven more times, with seven more test pulses sent. RS232 is asyncronous, so the receive timing is completely seperate from the incoming signal.

With a double beam scope you can compare the incoming RS232 with the test pulses you've generated - the test pulses should be nicely in the centre of the RS232 bits.
 
Hi Mike,
Where in your code would I do to mod your half-duplex program to run at 4800 baud? Thanks
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…