the manual is in PDF format.
Let me know what is missing when you can.
from the data sheet only 3 setup as to be done for receiving.
thank you
the manual is in PDF format.
Let me know what is missing when you can.
from the data sheet only 3 setup as to be done for receiving.
thank you
Last edited by jackberg1; - 19th January 2025 at 03:25.
Check this thread.
https://www.picbasic.co.uk/forum/sho...IN-with-a-WAIT
"No one is completely worthless. They can always serve as a bad example."
Anonymous
Also, HSERIN starts saving the variables after the WAIT requirement has been met. In your case, it will only save 11 numbers instead of 12.
Code:' code to scan sample : 0 59749 96859 1 MAIN: HSERIN [wait ("0"), str AArray\11]
"No one is completely worthless. They can always serve as a bad example."
Anonymous
I rectified it (hserin 5,MAIN,[STR AARRAY\12])
here's the code from today post:
HSERIN [wait ("0"), str AArray\12]
serOut2 PORTB.0,84, [str BArray\12,13,10]
Thanks for your time, I'll look at it, also I did used a timeout label (hserin 5,MAIN,[STR AARRAY\12])
still no result.
Thanks again.
Works ok for me if BArray has something printable placed in it
perhaps u wired it up incorrectly
Warning I'm not a teacher
thanks to everyone involved to help me on this project.
I tried about every way to setup the HSerin1,2
still not working.
I'm realy suprise since these HSerin command are part of PBP3 for at least 15 years
and today in 2025 cannot find any reliable sample codes.
even the PBP3 examples does not work at all for my setup.
I had 1 rs232/ttl scanner bad (intermitent power on the rs232 rail)
connected another one and the only easy way to make work it's
with the code below.
Code:MAIN: '-------------------------------------------- serin2 PORTB.0,84,50,MAIN,[STR AARRAY\12] serOut2 PORTB.1,84, [str aarray\12,13,10] serOut2 PORTB.1,84, ["Done!",13,10] '-------------------------------------------- GoTo MAIN
Last edited by jackberg1; - 19th January 2025 at 22:02.
works as expected
only slight change was to move serout to portb.7 to suit my pickit2 debug uart tool and put something printable
into BArray
what doesn't work are code snippets and failure to provide connection details [ schematic]Code:'-------------------------------------------------------------------------' Name : Hserin Test (18F25K22) ' Serout Baud rate: 188:4800,84:9600,49:14400,32:19200,15:28800,6:38400 'ok ' Serout : p296,297 ' 9600 Open Inverted None 49236 ' HSERIN [WAIT("!"), STR MyArray\200, STR MyArray(200)\200, _ ' STR MyArray(400)\200, STR MyArray(600)\100] ' '------------------------------------------------------------------------- Include "modedefs.bas" ' Include serial modes ;----[18F25K22 Hardware Configuration]------------------------------------------ #CONFIG CONFIG FOSC = INTIO67 CONFIG PLLCFG = On CONFIG WDTEN = Off CONFIG MCLRE = INTMCLR CONFIG LVP = Off #ENDCONFIG ANSELA = 0 ; All Digital ANSELB = 0 ANSELC = 0 DEFINE OSC 64 TRISA = % 11111111 '1:IN, 0:OUT TRISB = % 11111111 TRISC = % 11111111 OSCCON = $70 OSCTUNE = $40 ' Set receive register to receiver enabled DEFINE HSER_RCSTA 90h DEFINE HSER2_RCSTA 90h ' Set transmit register to transmitter enabled DEFINE HSER_TXSTA 20h DEFINE HSER2_TXSTA 20h ' Set baud rate DEFINE HSER_BAUD 9600 DEFINE HSER2_BAUD 9600 DEFINE HSER_CLROERR 1 AArray VAR BYTE[12] BArray VAR BYTE[12] ARRAYWRITE BARRAY,["GOT IT",0] ' code to scan sample : 0 59749 96859 1 MAIN: HSERIN [wait ("0"), str AArray\12] serOut2 PORTB.7,84, [str BArray,13,10] GoTo MAIN
and even a description of what happens versus what you expect to happen
![]()
Last edited by richard; - 19th January 2025 at 23:56.
Warning I'm not a teacher
Bookmarks