![]() |
Applications of AVR single chip controllers AT90S, ATtiny, ATmega and ATxmega DCF77 sync serial receiver with an ATtiny24 |
![]() |
;.equ clock = 1000000 ; Clock frequency of controller in Hz
; LCD size:
.equ LcdLines = 1 ; Number of lines (1, 2, 4)
.equ LcdCols = 8 ; Number of characters per line (8..24)
; LCD bus interface
.equ LcdBits = 4 ; Bus size (4 or 8)
; If 4 bit bus:
.equ Lcd4High = 1 ; Bus nibble (1=Upper, 0=Lower)
.equ LcdWait = 0 ; Access mode (0 with busy, 1 with delay loops)
; LCD data ports
.equ pLcdDO = PORTA ; Data output port
.equ pLcdDD = DDRA ; Data direction port
; LCD control ports und pins
.equ pLcdCEO = PORTB ; Control E output port
.equ bLcdCEO = PORTB2 ; Control E output portpin
.equ pLcdCED = DDRB ; Control E direction port
.equ bLcdCED = DDB2 ; Control E direction portpin
;equ pLcdCRSO = PORTB ; Control RS output port
.equ bLcdCRSO = PORTB0 ; Control RS output portpin
.equ pLcdCRSD = DDRB ; Control RS direction port
.equ bLcdCRSD = DDB0 ; Control RS direction portpin
; If LcdWait = 0:
.equ pLcdDI = PINA ; Data input port
.equ pLcdCRWO = PORTB ; Control RW output port
.equ bLcdCRWO = PORTB1 ; Control RW output portpin
.equ pLcdCRWD = DDRB ; Control RW direction port
.equ bLcdCRWD = DDB1 ; Control RW direction portpin
; If you need binary to decimal conversion:
;.equ LcdDecimal = 1 ; If defined: include those routines
; If you need binary to hexadecimal conversion:
;.equ LcdHex = 1 ; If defined: include those routines
; If simulation in the SRAM is desired:
;.equ avr_sim = 1 ; 1=Simulate, 0 or undefined=Do not simulate
Further properties to be adjusted in the source code are:
Top of page | Hardware | Software |
---|