Download presentation
Presentation is loading. Please wait.
1
Digilab DIO2 LCD Module F5.1
2
DIO2 circuit board block diagram
6
\ LCD for Digilab DIO2 \ LCD2.WHP HEX : hex2asc ( n -- asc ) 0F AND \ mask upper nibble DUP 9 > \ if n > 9 IF 37 + \ add $37 ELSE 30 + \ else add $30 THEN ; Lcd2.whp
7
: 30ms.delay ( -- ) A FOR NEXT ; : lcd.init ( -- ) 30ms.delay 3C 0 LCDinst! \ 2 x 40 display nop 0f 0 LCDinst! \ display on nop 1 0 LCDinst! \ display clear nop nop 6 0 LCDinst! \ entry shift off ; Lcd2.whp
8
: hex>lcd ( hex -- ) HEX2ASC 0 LCDdata! ; : u.lcd ( u -- )\display T on LCD DUP C RSHIFT hex>lcd DUP 8 RSHIFT hex>lcd DUP 4 RSHIFT hex>lcd hex>lcd ; Lcd2.whp
9
: MAIN ( -- ) lcd.init BEGIN waitB4 S@\ get high byte DUP DIG! DUP hex>lcd 8 LSHIFT waitB4 S@\ get low byte OR DUP DIG! DUP hex>lcd waitB4 u.lcd \ display on lcd AGAIN ; Lcd2.whp
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.