| Author |
Message |
|
|
Posted: Oct 04, 2011 - 07:42 PM |
|

Joined: Aug 06, 2007
Posts: 275
|
|
Hi All,
I was wondering whether someone could shed some light on the following problem. I would like to use the two DAC channels on PORTB (these would be PIN2, and PIN3), but at the same time, I would also need a general purpose digital output line on PIN7. However, when I try to do this, it simply does not work. When I move the digital output to PORTC or PORTA, everything is OK, so I conclude that the code is right. (Nothing re-sets the output direction on PORTB.)
My question is whether the digital output lines on PORTB can be used in conjunction with the DAC.
Cheers,
Zoltán |
|
|
| |
|
|
|
|
|
Posted: Oct 04, 2011 - 08:04 PM |
|

Joined: Sep 22, 2011
Posts: 91
|
|
| The issue is that you have a conflict with the XMEGA JTAG, which uses pins PB4 - PB7. You'll either have to disable the JTAG interface (if this is acceptable), or use different pins. |
|
|
| |
|
|
|
|
|
Posted: Oct 04, 2011 - 08:27 PM |
|

Joined: Aug 06, 2007
Posts: 275
|
|
Thanks for the quick reply! I don't need JTAG, so I could definitely get rid of that. But I could not figure out how to set the fusebytes on the xmega using avrdude. Any comments on that? Is it possible at all, or should I do it through avrstudio?
Thanks,
Zoltán |
|
|
| |
|
|
|
|
|
Posted: Oct 04, 2011 - 09:08 PM |
|

Joined: Sep 22, 2011
Posts: 91
|
|
It's probably safer (with less chance of accidental error) to do it using AVR Studio.
I haven't tried it with AVRDUDE myself, but the last time I used AVRDUDE to program my XMEGA, it blew away the bootloader even though I thought I was only programming the application section. It might have been user error, but it may also be that AVRDUDE support for the XMEGA is incomplete. |
|
|
| |
|
|
|
|
|
Posted: Oct 05, 2011 - 07:32 AM |
|

Joined: Aug 06, 2007
Posts: 275
|
|
|
|
|
|
|