View previous topic :: View next topic |
Author |
Message |
al
Joined: 29 Jun 2004 Posts: 7
|
Posted: Tue Jun 29, 2004 1:41 pm Post subject: Q for INPUT Command |
|
|
Hello,
I need a trick to input via terminal(rs232) a 48bit long hex number
(FFFFFFFFFFFF hex) under bascom Avr.
the INPUT command only suport a LONG var. (FFFFFFFF hex)
i need to input the 48bit number complete, and not in 3 times word.
any idea?
bye |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5921 Location: Holland
|
Posted: Wed Jun 30, 2004 10:22 pm Post subject: |
|
|
While you could get the number, where would you store it?
As you can not use a LONG, what good is it , to have the 48 bits?
the best option would be to change the lib code in mcs.lib so 48 bits are fetches instead of 32. _________________ Mark |
|
Back to top |
|
|
al
Joined: 29 Jun 2004 Posts: 7
|
Posted: Thu Jul 01, 2004 7:11 am Post subject: |
|
|
i would to store the 48bit number in sram.
i need the 48bit number to adress a hd drive in lba mode.
wenn i make the code: (e.g. the complete number is 112233445566 hex)
input long
input word
then i must press return after the first 32bit (e.g.11223344hex)
the i must input the other bytes (e.g.5566hex). and press return.
i need a code to press only 1 time return.
(e.g. dim x as superlong48bit
input x )
after input the number i will split the 48bit number in 6x 1byte.
e.g.
a=11hex
b=22hex
c=33hex
d=44hex
e=55hex
f=66hex
please help. |
|
Back to top |
|
|
satz
Joined: 26 Apr 2004 Posts: 22
|
Posted: Sat Jul 03, 2004 3:20 am Post subject: |
|
|
Use the inputbin command, e.g.
Dim ar(6) as byte
Inputbin ar(1);6 'will load 6 bytes (48 bits) into the array
Please note that the inputbin does NOT wait for the <return>,
but executes when the specified number of bytes is received |
|
Back to top |
|
|
al
Joined: 29 Jun 2004 Posts: 7
|
Posted: Sat Jul 03, 2004 7:07 pm Post subject: |
|
|
thanks! |
|
Back to top |
|
|
|