Al
Sorry I'v been in an unexpected vacation, but I'm back now and ready to go.
Master PIC talking to Slave PIC to control a motor.
As I said above comunication is good.
I need to capture the three zero characters that are being sent to the Masters LCD display from the slave.
RS-232
Testip: bsf portb,rb0 ; Red LED on.
call rxw ;Test for new data.
btfss status,z ;If z set then new data.
return ;Return If z is clear.
call txw ;Send same data byte back.
movwf reflevel2
bsf portb,rb1 ;Green LED on.
return
========================================
Rxw: bcf status,z ;z flag cleard to show no data.
btfss pir1,rcif ;Test for new data.
return ;No data exit, z flag clear.
btfss rcsta,ferr
goto rw1
*> movf rereg,w ;Move data into W.
bcf status,z
goto rw2
=========================================
*> I would thing that at this point I could copy the new data to
a file name stop,then compare it to a file name STOP that has '000'
in it and if so stop the motor.
--------------------------------------------------------------------------------
What do think?
I need to look the compare cmd for the PIC16F88.
Thanks
Frank G.
No Flow Chart
Who is online
Users browsing this forum: No registered users and 21 guests