Search found 26 matches

by Nitz76
Sun Sep 15, 2013 4:20 am
Forum: V-USB
Topic: ATMEGA328P on V-USB
Replies: 43
Views: 52028

Re: ATMEGA328P on V-USB

ulao wrote:what's funny about that is I had that same misunderstanding.
http://www.avrfreaks.net/index.php?name ... bootloader
Guess who helped me?

Though I completely over looked that. :oops:


So funny! :P Sometimes... well almost all the times it's something obviously simple but forgotten... :mrgreen:

Cheers everyone!
by Nitz76
Tue Sep 10, 2013 1:40 am
Forum: V-USB
Topic: ATMEGA328P on V-USB
Replies: 43
Views: 52028

Re: ATMEGA328P on V-USB

Guys... this is a basic mistake; if the bootloader is set to 0x3800... this is counted in "words". When you move the origin of the program, it's counted in "bytes" (2x) sooo when you set the bootloader start address, it's 2x 0x3800 = 0x7000. End of the story. Thanks to clawson@av...
by Nitz76
Mon Sep 09, 2013 3:47 pm
Forum: V-USB
Topic: ATMEGA328P on V-USB
Replies: 43
Views: 52028

Re: ATMEGA328P on V-USB

Here you go. P.S. I changed the boot address to $3800 main.elf: file format elf32-avr SYMBOL TABLE: 00003800 l d .text 00000000 .text 00800100 l d .bss 00000000 .bss 00820000 l d .fuse 00000000 .fuse 00830000 l d .lock 00000000 .lock 00840000 l d .signature 00000000 .signature 00000000 l d .debug_ar...
by Nitz76
Mon Sep 09, 2013 3:54 am
Forum: V-USB
Topic: ATMEGA328P on V-USB
Replies: 43
Views: 52028

Re: ATMEGA328P on V-USB

Hey, I tried some things today. I have another board using a atmega328p. I'm 100% sure this one is powered/decoupled properly. I wrote a simple bootloader application. I moved that application to 0x3C00 + fuses to start bootloader at $3C00 and BOOTRST set. This application turns on a led and loop. I...
by Nitz76
Sun Sep 08, 2013 1:39 am
Forum: V-USB
Topic: ATMEGA328P on V-USB
Replies: 43
Views: 52028

Re: ATMEGA328P on V-USB

I ordered some atmega168a from digikey. Looks like 168 has been corrected for... things... thus they issued a new part number with an "a". It is not a picopower. This is the first time I deal with bootloader with picopower atmega. I'll try to correct the board just to prove that it's the i...
by Nitz76
Sat Sep 07, 2013 8:05 pm
Forum: V-USB
Topic: ATMEGA328P on V-USB
Replies: 43
Views: 52028

Re: ATMEGA328P on V-USB

So... you're saying that I can use an Atmega168 and I should not have any issue like i'm having right now? I'll give it a try, since my PCB is already setup at my PCB fab. I would save some $$$.

Thanks!
by Nitz76
Sat Sep 07, 2013 7:30 pm
Forum: V-USB
Topic: ATMEGA328P on V-USB
Replies: 43
Views: 52028

Re: ATMEGA328P on V-USB

Here are the picture of the board and the schematic:

Image

Image

Maybe there are 1 or 2 caps missing. :(
by Nitz76
Sat Sep 07, 2013 4:20 pm
Forum: V-USB
Topic: ATMEGA328P on V-USB
Replies: 43
Views: 52028

Re: ATMEGA328P on V-USB

Thanks vouvoume for clarifying that.

Do you know any issues or particularities with atmega328p bootloader versus atmega8 ?
I'm puzzled.
by Nitz76
Sat Sep 07, 2013 4:55 am
Forum: V-USB
Topic: ATMEGA328P on V-USB
Replies: 43
Views: 52028

Re: ATMEGA328P on V-USB

:idea: This is something wrong. According to the documentation, for a 328p it should be direct jump with "jmp 0x????" and not an indirect rjump. Do you know how to change that?
by Nitz76
Sat Sep 07, 2013 4:45 am
Forum: V-USB
Topic: ATMEGA328P on V-USB
Replies: 43
Views: 52028

Re: ATMEGA328P on V-USB

I'm seeing something pretty wierd... Interrupt vectors looks different for atmega8 and atmega328p; atmega8: 00001800 <__vectors>: 1800: 50 c0 rjmp .+160 ; 0x18a2 <__ctors_end> 1802: 84 c0 rjmp .+264 ; 0x190c <__vector_1> 1804: 69 c0 rjmp .+210 ; 0x18d8 <__bad_interrupt> 1806: 68 c0 rjmp .+208 ; 0x18...
by Nitz76
Sat Sep 07, 2013 4:38 am
Forum: V-USB
Topic: ATMEGA328P on V-USB
Replies: 43
Views: 52028

Re: ATMEGA328P on V-USB

Tried it with 0x3C00... Same deal I'm pretty sure it's a memory location issue for... something. It's booting fine since trigging my button change the way it reacts. The USB driver needs INT0 to work. I suspect the interrupt routine to not be called properly with this chip or there is a compiler err...
by Nitz76
Fri Sep 06, 2013 7:26 pm
Forum: V-USB
Topic: ATMEGA328P on V-USB
Replies: 43
Views: 52028

Re: ATMEGA328P on V-USB

Table 28-6. Extended Fuse Byte for ATmega328/328P Extended Fuse Byte Bit No Description Default Value – 7 – 1 – 6 – 1 – 5 – 1 – 4 – 1 – 3 – 1 BODLEVEL2(1) 2 Brown-out Detector trigger level 1 (unprogrammed) BODLEVEL1(1) 1 Brown-out Detector trigger level 1 (unprogrammed) BODLEVEL0(1) 0 Brown-out De...
by Nitz76
Fri Sep 06, 2013 5:10 pm
Forum: V-USB
Topic: ATMEGA328P on V-USB
Replies: 43
Views: 52028

Re: ATMEGA328P on V-USB

For a 1024 word bootloader section on the 328p, the bootloader needs to be compiled such that it starts at $3C00, give it a try Also I was pretty certain BOOTSZ0 had to be unchecked. Are you migrating from a 168? I think it was $3800 for a 168 chip ( easy mistake ), also the 328 swapped BOOTSZ &...
by Nitz76
Fri Sep 06, 2013 3:45 pm
Forum: V-USB
Topic: ATMEGA328P on V-USB
Replies: 43
Views: 52028

Re: ATMEGA328P on V-USB

Hi Nitz, I though you were not a fan of low speed devices? Either way welcome to the v-usb project ( one year late ). I had this same issue I see you set the make/environment settings for 0x3c00 did you also match the fuses( not at a system that I can check that on right now ) and burn at the top o...
by Nitz76
Fri Sep 06, 2013 5:57 am
Forum: V-USB
Topic: ATMEGA328P on V-USB
Replies: 43
Views: 52028

Re: ATMEGA328P on V-USB

Update:

When I turn on TEST_MODE, put the bootloader origin to 0x0 and turn off the BOOTRST option in the fuse, it works...

Hummm... someting wrong with the bootflash mode and vectors... :?

Any suggestion?

Nitz