Software > Software

Webbotlib software UART compile error in C

(1/1)

klims:
I'm back again with another compile error :(

I am getting compile errors when trying to include a software UART in my project. The errors I'm getting are:

lib/gen_SerialServoDriver_uart.c: In function '__vector_14':
error: 'PB0' undeclared (first use in this function)
...and so on all relating to uses of PB0.

I have tried many other pins but I get the same compile error (but the pin changes).
I have been able to successfully compile using the pins that didn't work in other project device (eg: PB0 on another device as a digital output).

Any ideas guys? Can anyone confirm for me if they are able to use software UART in their project?


Thanks.

Webbot:
Its another blessed AVR anomoly. On some chips they call the pins PB0, PB1 etc but on the ATmega328P they decided to call them PORTB0, PORTB1 etc.
So until I can get a fix out then change

--- Code: ---#define TRANSMIT_PIN   PB0

--- End code ---
to

--- Code: ---#define TRANSMIT_PIN   PORTB0

--- End code ---

klims:
Awesome. Thanks Webbot!

Webbot:
No worries! New Project Designer now released that fixes the problem.

Navigation

[0] Message Index

Go to full version