Referencing: thread314-1263352
BA2PC Qbasic notes
Serial comm settings: 300,8,1,N, DTR turns BA on/off
Source code (Qbasic/VB):
Here's the code to detect a bill :
The above adds one bill(credit) for every character in the buffer. One (1) char per bill, five (5) chars for a five dollar bill etc. *Should* check for Valid input:
HEX(0xF8, 0xFC, 0xFE) BIN(1111|1000, 1111|1100, 1111|1110)
If there is still an interest in the BA2PC (bill acceptor to Personal Computer) with Qbasic, please contact me. We aren't supporting the QBasic formally, but I really miss it. Supporting non-profit programmers with open source code. We've still got archived notes and source code. If you have any questions contact me. Any new source I'll post it.
Regards
Chrisbv
BA2PC Qbasic notes
Serial comm settings: 300,8,1,N, DTR turns BA on/off
Source code (Qbasic/VB):
Code:
OPEN "com1: 300, n, 8, 1,cd0,cs0,ds0,op0,rs,rb2048" FOR INPUT AS #1
Here's the code to detect a bill :
Code:
ON COM(1) GOSUB getbill
getbill:
credit = credit + 1
HEX(0xF8, 0xFC, 0xFE) BIN(1111|1000, 1111|1100, 1111|1110)
Code:
REM DTR to turn the BA on/off:
OUT &H3F8, 1 'ON
REM where &H3F8 is your UART comm port (not USB)
OUT &H3F8, 0 'OFF
Regards
Chrisbv