Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Qbasic serial comm for dollar bill acceptor input

Status
Not open for further replies.

BA2PC

Programmer
Oct 8, 2007
8
US
Referencing: thread314-1263352
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
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)

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
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top