SERIN doesn't need square bracket. Within bracket you will place the qualifier, not the variable.
Al.Code:serin GPIO.1, 6, [val] serin GPIO.1, 6, val
SERIN doesn't need square bracket. Within bracket you will place the qualifier, not the variable.
Al.Code:serin GPIO.1, 6, [val] serin GPIO.1, 6, val
Last edited by aratti; - 24th February 2010 at 22:01.
All progress began with an idea
I took the Brackets off the SERIN command and it still does not work.
The above is from USB2SER data sheet, and it seems you should use TRUE STATE. Tray to change to:The USB2SER is not able to program BASIC Stamp® microcontroller modules. BASIC Stamp modules
require an inverted signal. If you need to program a BASIC Stamp use the FTDI USB to Serial Adapter
serin GPIO.1, 2, val
and
serout GPIO.2, 2, [val]
(see PBP manual pag 130)
Al.
Last edited by aratti; - 24th February 2010 at 23:27.
All progress began with an idea
I hooked up the serial input from my pc and tested it on my oscilloscope. What I got was not a serial data string but something similar to a triangular waveform. I looked up the datasheet for the ftdi chip. I fixed it by adding a pulldown resistor to the output of the ftdi chip. Thanks for everybodys help.
Code:val var byte TRISIO = %00000010 CMCON0 = 7 ANSEL = %00000000 main: serin GPIO.1, 6, val if (val = "a") then ser goto main ser: Serout GPIO.2, 6, ["Got a"] pause 10 goto main
Bookmarks