Hi,
I have been trying to get my Axon to do an very basic LED blink as I am learning to program I figured this would be a good start. I have 5.52 V applied to the Axons Bat pin for power and An AVR ISP MKK II set up on its six pin header to load up the code. The LED is placed across Pin 1 on PORT A from ground to the I/O pin ( ie skipping the middle + Unregulated Battery pin. The Code I am tinkering with is :
#define F_CPU 16000000 // AVR clock frequency in Hz, used by util/delay.h
#include <avr/io.h>
#include <util/delay.h>
int main() {
DDRA = _BV(PA6);
while (1) {
PORT_ON(PORTA,1);
_delay_ms(100); // delay 100 ms
PORT_OFF(PORTA,1); // drive A1 low
_delay_ms(900); // delay 900 ms
}
}
The Errors I get are thus:
Warning 1 implicit declaration of function 'PORT_ON' [-Wimplicit-function-declaration] C:\Users\Donald\Documents\Atmel Studio\BlinK_LED_3\BlinK_LED_3\BlinK_LED_3.c 10 4 BlinK_LED_3
Warning 2 implicit declaration of function 'PORT_OFF' [-Wimplicit-function-declaration] C:\Users\Donald\Documents\Atmel Studio\BlinK_LED_3\BlinK_LED_3\BlinK_LED_3.c 12 4 BlinK_LED_3
Error 3 undefined reference to `PORT_ON' C:\Users\Donald\Documents\Atmel Studio\BlinK_LED_3\BlinK_LED_3\Debug/.././BlinK_LED_3.c 10 1 BlinK_LED_3
Error 4 undefined reference to `PORT_OFF' C:\Users\Donald\Documents\Atmel Studio\BlinK_LED_3\BlinK_LED_3\Debug/.././BlinK_LED_3.c 12 1 BlinK_LED_3
**IDE is AVR studio 6.018
Code compiles fine without the PORT_ON and PORT_OFF in it but nothing on the LED. Any help would be great.
Thanks,
Don