Like this?
serin2 portb.6,16468,[WAIT(13),STR textline\8]
It works, but with big delay and not repsonding to "ENTER"
actually, it only works when 8 characters are typed in a row quickly...
Like this?
serin2 portb.6,16468,[WAIT(13),STR textline\8]
It works, but with big delay and not repsonding to "ENTER"
actually, it only works when 8 characters are typed in a row quickly...
More like this
serin2 portb.6,16468,[STR textline\8\13]
It will exit either filling 8 characters in the textline or earlier if you hit enter
If you want also to start filling textline after first enter then use this (not recommended though):
serin2 portb.6,16468,[WAIT(13),STR textline\8\13]
because serin may get confused which enter is, first or last. Better use different character for start and finish.
Ioannis
Wow thanks!
it works like Charm!
Great !
But if you need start character better be different than stop character.
Ioannis
Tried to use this with arduino, instead of RS-232. But it does not work, since polarity is inverted.
Added simple 1 transistor inverter and everything is fine, but maybe it is possible to modify PBP settings for SERIN2 to accept "inverted" serial data?
Not sure what you mean by "arduino, instead of RS-232" but if you take a look at the SERIN2 section of the manual you'll find:andMode is used to specify the baud rate and operating parameters of the serial transfer.
The low order 13 bits select the baud rate. Bit 13 selects parity or no parity. Bit 14
selects inverted or true level. Bit-15 is not used.So if 16468 works WITH external inverter then flipping bit 14 should make it work WITHOUT external inverter.Bit 14 selects the level of the data and flow control pins. If bit 14 = 0, the data is
received in true form for use with RS-232 drivers. If bit14 = 1, the data is received
inverted. This mode can be used to avoid installing RS232 drivers.
Needless to say that everything regarding Serin and Serin2 is in the manual with detail.
Cannot see connection of the above to Arduino...
Ioannis
Bookmarks