Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * Projekt1.c
- *
- * Created: 2014-10-13 13:42:50
- * Author: michbar055
- */
- #ifndef F_CPU
- #define F_CPU 1000000UL
- #endif
- #include <avr/io.h>
- #include <util/delay.h>
- #include <avr/pgmspace.h>
- #define nLength 100
- uint8_t const TAB_ROM[] PROGMEM = { 0x11, 0x00, 0x00 };
- uint8_t TAB_RAM[nLength];
- int main(void)
- {
- DDRA = 0x00;
- PINA = 0XFF;
- DDRB = 0xFF;
- PORTB = 0x00;
- char byte;
- int i;
- for(i = 0; 1; i++)
- {
- if(!pgm_read_byte_far(&TAB_ROM[i]) && !pgm_read_byte_far(&TAB_ROM[i+1]))
- {
- break;
- }
- byte = pgm_read_byte_far(&TAB_ROM[i]);
- PORTB = byte;
- _delay_ms(1000);
- }
- PORTB = 0x00;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement