how to receive unsigned long int value from RS232 and display it on VGA screen?
kamengrinder666
Posts: 8
i want to receive unsigned long int value from RS232 and display it on VGA Screen
i can receive unsigned long int from RS232 and display it on hyperterminal now
but i have no idea how to display that value on VGA screen
i use an object "VGA Text" now
but it doesn't work . it can display only integer value. anybody have any idea?
this is my first post , sorry for my english in advance
i can receive unsigned long int from RS232 and display it on hyperterminal now
but i have no idea how to display that value on VGA screen
i use an object "VGA Text" now
but it doesn't work . it can display only integer value. anybody have any idea?
this is my first post , sorry for my english in advance
Comments
If you still have problems you should post the code you are using with your request.
welcome to the propeller-forum.
The VGA_Text.spin file has a method "dec" which translates the 32bit-number of a long into a decimal digits.
If your vga_text-object does not contain a dec-method please tell us from where you are using this object and attach your archived project to a psoting
best regards
Stefan
For Spin longs are all signed values, so with the .dec() methode you always get a signed number displayed.
You can use the .hex(value,8) methode to get a hexadecimal form (which is unsigned) or a construct like that: for a decimal unsigned value.
Andy
it's a very very unexpected simple code
con
_clkmode = xtal1 + pll16x
_xinfreq = 5_000_000
TXPIN = 0
RXPIN = 1
obj
ser : "Extended_FDSerial"
text : "vga_text"
pub main | rss
ser.start(RXPIN,TXPIN,0, 9600)
text.start (16)
rss := "e" ' an character that i transmitt to receiver
ser.tx (rss)
repeat
text.out (ser.rx)
i have another question .
how to quit from repeat loop when all of value were received?
thank you in advance!!!
sorry for my english again.
here I would like to know what you want to do in the end.
The best solution depends on that. So please give us (the forum-members) an overview about what is the purpose of receiving integervalues and displaying them on the screen.
There is another driver FullDuplexSerialPlus. This object has methods to receive ASCII-codes numbers and translate them into integers.
The basic technique to do this is to send a character that signals endof number which usually is ASCII-code decimal 13 (carriage return in short CR)
keep the questions coming
best regards
Stefan