go_away

Author Topic: Webbotlib software UART compile error in C  (Read 906 times)

0 Members and 1 Guest are viewing this topic.

Offline klimsTopic starter

  • Robot Overlord
  • ****
  • Posts: 188
  • Helpful? 2
Webbotlib software UART compile error in C
« on: June 13, 2012, 05:57:47 AM »
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.

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,132
  • Helpful? 108
Re: Webbotlib software UART compile error in C
« Reply #1 on: June 13, 2012, 04:26:24 PM »
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: [Select]
#define TRANSMIT_PIN   PB0
to
Code: [Select]
#define TRANSMIT_PIN   PORTB0
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline klimsTopic starter

  • Robot Overlord
  • ****
  • Posts: 188
  • Helpful? 2
Re: Webbotlib software UART compile error in C
« Reply #2 on: June 13, 2012, 05:19:31 PM »
Awesome. Thanks Webbot!

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,132
  • Helpful? 108
Re: Webbotlib software UART compile error in C
« Reply #3 on: June 13, 2012, 05:23:16 PM »
No worries! New Project Designer now released that fixes the problem.
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

 


Get Your Ad Here

data_list