[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-chat] A simple problem ?
From: |
Axel Wachtler |
Subject: |
Re: [avr-chat] A simple problem ? |
Date: |
Sat, 18 Jun 2016 09:37:35 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 |
Hi Ray,
sounds strange, here are my 2cents how to hunt down that issue:
- How do you compile the programm?
Can you send the actual build output? (compile log)
- Are there warnings (e.g. about opimization level) that you have
overseen/ignored? At least F_CPU should spec'd via the gcc-command
line, otherwise there is at least an redefinition warning.
- Me comes to mind that delay_ms might accept 256ms max ... but I'm
not 100% certain in the moment.
- Does the fuses of your MCU match the clock frequency?
- Making all ports to outputs of your PIC^H^H^HAVR looks a bit
ruffian. Just check to which pin the LED actually is connected and
enable this pin, e.g. for PB5:
DDRB |= (1<<PB5); ... enable PB5 as output
PORTB |= (1<<PB5); ... set PB5 to 1
PORTB &= ~(1<<PB5); ... set PB5 to 0
Best Regards, Axel
Am 18.06.2016 um 06:45 schrieb Ray Pasco:
I know the programmer, AVRdude and the dev board work fine because an
old hex file of a blink program actually does cause the LED to blink. It
was developed some years ago on Win7 using the same compiler version.