Last edited by Archangel; - 24th February 2010 at 04:56.
If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
.
Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
.
There simply is no "Happy Spam" If you do it you will disappear from this forum.
Since you made variable addr a word then you have to change your serin command to receive two bytes to be combined into one word. This means you have to Tx two bytes (SERIN is unable to receive word)
Al.Code:serin sein, 6, addr serin sein, 6, addr.byte0,addr.byte1
Last edited by aratti; - 24th February 2010 at 20:15.
All progress began with an idea
I have decided to narrow it down just to the SERIN command. I made a program to read the serial command from the pc and then transmit it back to the pc. When I send the serial data to the pic the transmit light flashes so I know the pc is sending the serial data but the pic is not retransmitting it back to the pc. I am using the debug terminal from the basic stamp program and Parallax USB2SER Development Tool.
Code:val var byte TRISIO = %00000010 main: serin GPIO.1, 6, [val] pause 10 serout GPIO.2, 6, [val] pause 10 goto main
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