27220 Parallax Inc, 27220 Datasheet - Page 185

BOOK STAMPWORKS

27220

Manufacturer Part Number
27220
Description
BOOK STAMPWORKS
Manufacturer
Parallax Inc
Datasheet

Specifications of 27220

Accessory Type
Booklet
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Not applicable / Not applicable
For Use With/related Products
StampWorks
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Not applicable / Not applicable
' -----[ Initialization ]--------------------------------------------------
Reset:
' -----[ Program Code ]----------------------------------------------------
Main:
' -----[ Subroutines ]-----------------------------------------------------
Get_Coins:
' Display money value until that value meets or
' exceeds the bank limit.
Show_The_Money:
HIGH Enable
GOSUB Show_The_Money
config = %00110001
GOSUB Update_Cfg
DO
LOOP UNTIL (deposit > 0)
money = money + (nickel * 5)
money = money + (dime * 10)
money = money + (quarter * 25)
money = money + (dollar * 100)
GOSUB Show_The_Money
PAUSE 250
IF (money < FullValue) THEN Main
DO
LOOP
deposit = %1111
FOR idx = 1 TO 10
NEXT
RETURN
IF (money < FullValue) THEN
GOSUB Get_Coins
PAUSE 500
config.BIT0 = ~config.BIT0
GOSUB Update_Cfg
deposit = deposit & ~Coins
PAUSE 5
dpCtrl = %1011
segs5 = Blank
segs4 = Blank
' disable MC14489
' initialize display segs
' use 3 digits, hex mode
' wait for coins
' add coins
' update the display
' scan until full
' toggle display
' enable all coin inputs
' test inputs
' delay between tests
' show money count
' display bright, show DP

Related parts for 27220