I have a simple ASM program for a ATmega32 circuitboard; it has a 7seg display on PORTB and 8 switches on PORTC. I'm also using an USBasp programmer.
I have written a code allows me to show a sequence of bits on the 7seg display, where I define the sequence in a table using .DB, as such:
SEQUENCE_1: .DB 0b10100000, 0b11110011 ; 0 and 1 .DB 0b10010100, 0b10010001 ; 2 and 3 .DB 0b11000011, 0b10001001 ; 4 and 5 .DB 0b10001000, 0b10110011 ; 6 and 7 .DB 0b10000000, 0b10000011 ; 8 and 9 SEQUENCE_2: .DB 0b00111111, 0b01110111 ; D6 and D3 .DB 0b01111011, 0b01111101 ; D2 and D1 .DB 0b01111110, 0b01101111 ; D0 and D4 SEQUENCE_3: .DB 0b01001000, 0b00100000 ; 8 & 0 .DB 0b00100000, 0b01001000 ; 0 and b .DB 0b01101110, 0b00001100 ; I and E .DB 0b00001001, 0b01111111 ; S and .
This is where the problem lies. If I for "SEQUENCE_2" try to set the 2nd byte (D3) to 0b11110111 instead of 0b01110111, the program never "launches". If I run a simulation (Atmel Studio 7), it just loops to the beginning of the whole code (not main), after trying to set that byte. Fortunately the MSB defines a dot for the 7seg display and I can keep it at 0, but it's still an annoyance.
I have zipped and attached the project.
Thanks in advance and best regards,