Gast
#617600
Hi ich hab mir den BLIPS bootloader runtergeladen http://www.esnips.com/web/blips der kommt mit einigen Vorlagen auch für den Mega128. Da wird allerdings gesagt das die momentane konfiguration für UART0 ist und für UART1 was geändert werden muss. Ich brauche - wie sollte es auch anders sein UART1 und weiss nicht was ich umschreiben muss. code ist hier unten, weitere infos unter dem Link oben. Irgendwer irgendwelche Ideen? Grüße Tobi #ifdef M128DEF_INC ; is within the chosen include file ;========================================================== ;==================== mega128 ============================= ;========================================================== ; UART baud rate setup constant- formula varies by chip type ; where this bootloader code begins, Change if this code outgrows 512 bytes .equ MYORG = FIRSTBOOTSTART ; NOTE! This chip doesn't support a boot memory area as small as 512Bytes; see fuses for it .equ UBRRLval = (clock - 8 * bootldr_baud) / (16 * bootldr_baud) ;the 8* part helps rounding ;--- device code and signature bytes for a atmega8 with bootloader .equ DT = 0x44 ; atmega bootloader ; Chip-dependent names for UART0 registers (See Table, below) .set BAUDL =UBRR0L ; baud rate low order bits .set UARTC =UCSR0B ; control .set USTAT =UCSR0A ; status .set UDATA =UDR0 ; data I/O register .set URXC =RXC0 ; rx char complete status bit number (data has arrived) .set UTXE =UDRE0 ; tx data register is empty .set UTXC =TXC0 ; tx complete status bit number ; values to use in configuring UART0 .set UARTENA =((1<<RXEN0) | (1<<TXEN0)) ; enable tx,rx for uart 0 or 1 (see table) .MACRO BOOTIDSTRING .DB "Mega128", 0 ; change this 7 char string. bootloader ID string, information-only to PC .ENDMACRO ;========================================================= #endif