I am trying to establish a connection between my Atmel Atmega 16 and USBD12 . PORTC is connected to the USBD12's data bits and the following pins of the PORTD is connected to RD_N, WR_N and AO.
RD_N PD4 WR_N PD5 A0 PD7
I am not getting a goodlink connection just by initializing USBD12. I mean the led is not getting lighted up. The hardware part is perfect as someone else have done USB communication with assembly code earlier. The pins of USBD12 that can be accessed by the Atmel are RD_N, WR_N, AO and DATA pins. Here is my C code.
#include #include #include
#include "global.h" uint16_t ee_pwm __attribute__((section(".eeprom"))) = 42;
//----- Begin Code
------------------------------------------------------------
#define USBRD PD4 #define USBWR PD5 #define USBA0 PD7
enum {USB_DATA,USB_COMM};
void delay(void) { volatile uint16_t i; for(i=0;i