;The Cerebot board has 8 ports named as JA, JB, JC, ..., and JH. It also has 4 LEDs named as LD1, LD2, LD3, and LD4. ;This program reads JA.4 to JA.7 and writes to User LEDs (LD1 to LD4) ;Connect DIP switches to JA. ;It is in AVR Assembly Language for AVR Studio IDE. Make the hex file using AVR Studio. ;See www.microdigitaled.com and www.digilentinc.com for more information .INCLUDE "M64DEF.INC" LDI R20, 0x00 OUT DDRA, R20 ;JA as input LDI R20, 0xF0 OUT DDRE, R20 ;User LEDs as output OUT PORTA, R20 ;make pull-up resistors active L1: IN R20, PINA ;R20 = JA ANDI R20, 0xF0 ;R20 = R20 & 0xF0 (just the high nibble) OUT PORTE, R20 ;User LEDs = R20 RJMP L1 ;go to L1