Porting powerswitch project to Atmega8
Posted: Mon Jul 09, 2007 11:51 am
I've been trying to port the powerswitch project to work with an atmega8 avr for a few days now (having read all posts in this forum regarding this topic..) but didn't really manage to get the thing working.
I understand that i should change the
function to be compatible with the atmega8, but i don't really understand howto.
when I update the usbconfig.h file with the PORTB-> PORTD changes and change the outputByte function like this:
it simply doesn't do anything.
If someone has a working implementation of this ported, please let me know, as my circuit is ready, but i just can't get the usb comm working.
Thanks for your help,
regards,
guz
I understand that i should change the
Code: Select all
static void outputByte(uchar b)
function to be compatible with the atmega8, but i don't really understand howto.
when I update the usbconfig.h file with the PORTB-> PORTD changes and change the outputByte function like this:
Code: Select all
static void outputByte(uchar b)
{
PORTD = (PORTD & ~0xfc) | (b & 0xfc);
PORTD = (PORTD & ~0x30) | ((b << 4) & 0x30);
}
it simply doesn't do anything.
If someone has a working implementation of this ported, please let me know, as my circuit is ready, but i just can't get the usb comm working.
Thanks for your help,
regards,
guz