Re: Serin Not Recognizing Qualifier From Another PIC
you misunderstand how the qualifier works
this can not work as you set the qualifier to 0x0d as per my example , ProgIDRx will always be 0x0d
untill you change it , serin will never change it
if ProgIDRx = $A then ' Match Programmer ID ;;// will always fail
this time out loop is pointless in this example as serin with [a qualifier ] will always block until the input qualifier is received
Serin PrgIn,1,5000,MainLoop,[ProgIDRx],IDByteRx ' Check for new I.D.
this will do the same thing
MainLoop:
Serin PrgIn,1,[ProgIDRx],IDByteRx ' Check for new I.D.
IDByte = IDByteRx
Write 1, IDByte
Z1Alarm = 1 : Z2Alarm = 1 ' Confirm programing Subroutine
pause 500
Z1Alarm = 0 : Z2Alarm = 0
pause 1000
Z1Alarm = 1 : Z2Alarm = 1 'Confirm in programing mode
pause 1000
Z1Alarm = 0 : Z2Alarm = 0
endif
;;;;;;;;;;;;;;;;;;;;;;;;;;;;; START ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
goto MainLoop
I added your modifications and still couldn't get it to work.
note i used 0x0d AS a qualifier as its easer to use than 0x0a in proteus simulator
u need to either change it back to 0x0a or alter the tx code to match
BTW, why the GPIO=0? Does that clear all GPIO ports, I presume
yes because at power up the alarm leds could be in any random state if you don't
Last edited by richard; - 19th April 2024 at 06:12.
Warning I'm not a teacher
Bookmarks