×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Qbasic serial comm for dollar bill acceptor input

Qbasic serial comm for dollar bill acceptor input

Qbasic serial comm for dollar bill acceptor input

(OP)
Referencing: thread314-1263352: Serial communication port, QBasic Code for photobooth fundraiser?
BA2PC Qbasic notes
Serial comm settings: 300,8,1,N, DTR turns BA on/off
Source code (Qbasic/VB): http://www.upstatenetworks.com/kiosk

 

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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close