thanx man...
here's the code for micro controller:
PinNumber var byte
PinState var byte
Main:
' Use the programming port to receive
' data at 2400 baud
' Wait for the synch byte (255) and then
' get the PinNumber and PinState
Serin 16,16780,[WAIT(255),PinNumber,PinState]
' If PinState=0 Then go to GoLow
' otherwise go to GoHigh
Branch PinState,[GoLow,GoHigh]
Goto Main
' Set The pin low
GoLow:
LOW PinNumber
Goto Main
' Set the pin high
GoHigh:
HIGH PinNumber
Goto Main
END
i have problem when compile it....the 'Serin 16,16780,[WAIT(255),PinNumber,PinState]' appear as bad expression...why is it???
Hi,
That's probably because WAIT isn't supported by the SERIN command, you'd need to change that to SERIN2 i think.i have problem when compile it....the 'Serin 16,16780,[WAIT(255),PinNumber,PinState]' appear as bad expression...why is it???
Or might be because PIN 16 is not a valid pin , funny I have never used PINs always used PortA, PortB etc . . less confusing I guess . . . anyway only 0-15 are valid: SEC. 4.11. PINS
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.
HenrikOlsson and Joe are saying change your code from
toCode:Serin 16,16780,[WAIT(255),PinNumber,PinState]
Seems to work much better using for example:Code:SERIN2 PORT?.?,16780,[WAIT(255),PinNumber,PinState]
PORTC.3
instead of
PIN?
Dave
Always wear safety glasses while programming.
texas5 -
Please note the information on Bruce's website prior to the code for this example:
That's probably where there is some confusion.Originally Posted by http://www.rentron.com/sending_data.htm
Wisdom is knowing what path to take next... Integrity is taking it.
Ryan Miller
Bookmarks