two thoughts looking at your code.........
...ProgIDRx = $A............ did you CLEAR ProgIDRx after reception and might need to be ....$"A" not sure but
two thoughts looking at your code.........
...ProgIDRx = $A............ did you CLEAR ProgIDRx after reception and might need to be ....$"A" not sure but
Hi Amgen,
Thanks for the reply. Yes, ProgIDRx is cleared. And its value is $A (or10). But, I haven't been able to receive it yet because nothing is being received. SERIN always exits upon the 5 second Timeout variable "PassProg" as if nothing is present at the pin.
And, in addition, If I had noise on the pin, SERIN would never time out. So, that indicates that SERIN is, at least, partially working, I would think.
I don't really use serin so I can't be of much help, but just to educate me: isn't the contents inside the square brackets a qualifier or filter - like the WAIT modifier in serin2?
Troy
one easy thing to do to troubleshoot your system....... add a temporary serout for the receiving 283 to see receptions and get all that working first as you continue with the rest of your code.... (I know you know all this) but it is like proofing the functions as you go along
Thanks Amgen. Good advice!
Still no progress. Beating my head against my desk on this one!
if using 12f683 ..... check your OSCCON ..... no PLL on 12f683 unless there is new 12f....
![]()
Hi Amgen,
I don't recall why I included a PPL in my oscillator comment but, I believe that I have my OSCON statement correct for an internal 4 MHz cock. Right?
OSCCON = %01100000 ' Set system internal clock 4MHz.
Thank you for pointing that out!
Hi Troy,
Here's my OSCON
OSCCON = %01100000 ' Set system clock 4MHz(1MHz internal w/x4 PLL enabled)
My SERIN SYNTAX
SERIN PrgIn,1,5000,PassProg,[ProgIDRx],IDByteRx ' Check for new I.D.
My Qualifier Variable
ProgIDRx VAR BYTE ' Received Programmer ID
My Byte of interest
IDByteRx VAR BYTE ' New IDByte
This should work, right???
Well, that's what I'm confused about. Don't you need to actually nominate something as the qualifier rather than an empty variable?
p207 of the manual:
"list of data items to be received may be preceded by one or more qualifiers enclosed within brackets. SERIN must receive these bytes in exact order before receiving the data items. If any byte received does not match the next byte in the qualifier sequence, the qualification process starts over (i.e. the next received byte is compared to the first item in the qualifier list). A Qualifier can be a constant, variable or a string constant. Each character of a string is treated as an individual qualifier."
So, if you have an empty variable as a qualifier, I guess serin is waiting for a "null" to arrive before accepting anything into IDByteRx.
That's the way I read it, but again, I've never really used serin.
Troy
Hi Troy,
Yes, the bracketed variable is the qualifier. SERIN won't receive or pass the data until it recognizes the presence of the qualifier in the received packet. For some reason, my qualifier is not being recognized or, GPIO.5 isn't correctly configured for SERIN? Or, something else???
Bookmarks