Hi,
I have the CRT-288-B card reader, connected via RS232 to a micro ATMEL1284.
specification of the command structure:
drive.google.com/file/d/1ktTtx…OMDkblMA/view?usp=sharing
then I had the confirmation that the data must be sent in hexadecimal ...
the command is correct, because if I send with REALTERM
0X02 0X00 0X02 0X33 0X30 0X03 0X00
and then
0x05
it works!
I have to do the same thing with BASCOM ...
this is the code I tried but it does not work ...
Alles anzeigen
I have the CRT-288-B card reader, connected via RS232 to a micro ATMEL1284.
specification of the command structure:
drive.google.com/file/d/1ktTtx…OMDkblMA/view?usp=sharing
then I had the confirmation that the data must be sent in hexadecimal ...
the command is correct, because if I send with REALTERM
0X02 0X00 0X02 0X33 0X30 0X03 0X00
and then
0x05
it works!
I have to do the same thing with BASCOM ...
this is the code I tried but it does not work ...
BASCOM-Quellcode
- $regfile = "m1284def.dat"
- $crystal = 16000000
- $baud = 19200
- $hwstack = 40
- $swstack = 40
- $framesize = 40
- Config Com2 = 9600 , Synchrone = 0 , Parity = None , Stopbits = 1 , Databits = 8 , Clockpol = 0
- Open "COM2:" For Binary As #2 'open channel
- Dim Crtcmd(16) As Byte
- enable interrupts
- Crtcmd(1) = &H02
- Crtcmd(2) = &H00
- Crtcmd(3) = &H02
- Crtcmd(4) = &H33
- Crtcmd(5) = &H30
- Crtcmd(6) = &H03
- Crtcmd(7) = &H00
- Printbin #2 , Crtcmd(1) ; 7
- Wait 2
- Crtcmd(1) = &H05
- Printbin #2 , Crtcmd(1) ; 1
- Wait 2
- Do
- Loop
- End