Computertechniek Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology 1 LCD aansturen een scrollende text laten zien
Computertechniek Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology 2 LCD file hello.zip uitpakken naar lege directory (geen spaties in de pathname…) run ‘as is’ geeft “Hello world” op het display
Computertechniek Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology 3 main LCD library delay library Chip startup code
Computertechniek Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology 4 LCD Library Subroutines: LCD_INIT eenmalig aanroepen LCD_CLEAR maakt het display leeg, cursor naar eerste positie LCD_PUTCHAR print het char in R0, schuift nar volgende positie
Computertechniek Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology 5 Text vastleggen hello:.asciz “Hello!”.align ldr r1, =hello
Computertechniek Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology 6.global main tekst:.asciz "Hello world!".align save registers stmfdsp!, { lr gebruik de LCD blLCD_INIT blLCD_CLEAR ldrr1, =tekst loop: ldrbr0,[ r1 ] addr1, r1, #1 cmpr0, #0 beqklaar blLCD_PUTCHAR bloop return ldmfdsp!, { pc }
Computertechniek Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology 7 blLCD_INIT blLCD_CLEAR ldrr1, =tekst loop: ldrbr0,[ r1 ] addr1, r1, #1 cmpr0, #0 beqklaar blLCD_PUTCHAR bloop klaar:
Computertechniek Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology 8 Doen Test “Hello world” Laat een andere text zien Maak een subroutine die een asciz string (R0 = pointer) laat zien op het LCD display (test deze subroutine) Laat een scrollende text zien op het LCD display
Computertechniek Hogeschool van Utrecht / Institute for Computer, Communication and Media Technology 9 Scroll een text ‘over’ het display, bv: Hello brave new ello brave new w llo brave new wo lo brave new wor o brave new worl brave new world brave new world. En dan weer overnieuw.