PDA

View Full Version : Dec2



lerameur
- 17th December 2006, 23:29
Hello,

I am trying to figure out what the command Dec2 and dec1 means,
They are just mentionned in the picbasic pro manual, but they are not comment. I seen them in programs, but I do not know what it does, Could someyone tell me what it mean.

Thank you

ken

paul borgmeier
- 18th December 2006, 03:28
See this example on MELAB's website - your questions should be clear after that

http://www.melabs.com/resources/samples/pbp/ser2mod.bas

mister_e
- 18th December 2006, 03:54
http://www.mister-e.org/Pics/whip.gifIt always worth to do some test with a PC or a LCD... it won't bite you


DEFINE OSC 20
DEFINE HSER_RCSTA 90h ' Enable serial port & continuous receive
DEFINE HSER_TXSTA 24h ' Enable transmit, BRGH = 1
DEFINE HSER_SPBRG 129 ' 9600 Baud @ 0.16%
DEFINE HSER_CLROERR 1 ' Clear overflow automatically

WordA var word

Start:
worda=1
gosub sendit
worda=12345
gosub sendit
Spin: goto Spin

SendIt:
hserout ["WordA=",dec worda,13,10,_
" DEC1:",dec1 worda,13,10,_
" DEC2:",dec2 worda,13,10,_
" DEC3:",dec3 worda,13,10,_
" DEC4:",dec4 worda,13,10,_
" DEC5:",dec5 worda,13,10]
return

<img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=1281&stc=1&d=1166414005">