Configuration details and variables for AT89C513 controller

Status
Not open for further replies.

vasureddym

Member level 2
Joined
Jan 7, 2005
Messages
51
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
424
Re: configuring AT89C5131??

hi all!

i 'm having trouble in configuring Atmel's AT89C5131 usb controller.
can some one list the configuration details for this controller.

thanks & regards
srinivas

Added after 6 minutes:

hi!
the configurations that i followed are as following:

// general configurations
enable Usb
detach Usb
delay
attach USB
Configure usb clock

// Endpoint configurations
select EP number
select EP type
reset EP fifo

// usb variable initializations (here is where i dought i'm going wrong)

what variables should i initialize??

regards,
srinivas
 

Re: configuring AT89C5131??

I have used the boot loader at the ATMEL site for the process of enumeration

(hxxp://www.atmel.com/dyn/products/product_card.asp?part_id=3011)

and it work.

I have changed only the part of the /* ENDPOINT 1 DESCRIPTOR */ with the characteristic of my device and the /*REPORT DESCRIPTOR */.

defer
 

Re: configuring AT89C5131??

I have used the boot loader at the ATMEL site for the process of enumeration
will you be more clear, please.

regards,
srinivas
 

Re: configuring AT89C5131??

Ok

In the ATMEL site you can find the :Implementing the USB Enumeration Process on the AT8xC5131/32/22 and AT8xC51SND1.
In this archive you can find the source code for the USB enumeration process.
I use the uVision2 V2.40 for compile the source code and the FLIP program (hxxp://www.atmel.com/dyn/products/tools_card.asp?tool_id=2767) for programming the device.
In the source code the only change that I do for correctly work the system are:
usb_drv.c : change the function ;configure_usb_clock for a correct PLL frequency
config.h : change the part of device descriptor

defer
 

configuring AT89C5131??

The document "Implementing the USB Enumeration Process on the AT8xC5131/32/22 and AT8xC51SND1" says all about implementing as per USB specifications. I need to know with respect to the controller.
i mean, OK, i'll let you know how i have configured;
1) Configure USB clock
2) Enable USB
3) Detach USB
4) Delay 5ms
5) Attach USB
6) Endpoint configuration
7) Variable initilization

what next now?
defer please respond.

Regards,
srinivas

Added after 3 minutes:

when i try to read the USBCON register at various points of configuration (above said), i found that the USBE bit (of USBCON) is cleared after "Detach USB" and before Attach USB
i could not understand why its happening. if something is not clear, please ask me back, its urgent for me pls understand
Regards,
srinivas
 

Re: configuring AT89C5131??

the procedure is:
For first USB_int
1. Usb_enable() set USBCONF
2. wait 5ms
3. configure_usb_clock() 48MHz
4. usb_configure_endpoint(number,type)
5. Usb_reset_endpoint
6. Usb_var_init

now the sheduler work and you enter in the USB_Task process. The state of this process are defitited in "usb specification 2.0" April 27 2000 page 240. In the code you can find:

if(Usb_suspend) USB_CONNECT = FALSE
if(Usb_resume)
USB_CONNECT = TRUE
Usb-clear_suspend()
Usb_clear_resume()
Usb_clear_sof() //Start Of Frame
else
USB_CONNECT = TRUE
if(Usb_reset) -> clear the end poin status
if(Usb_soft) -> sof_counter ++
if(EP_interrupt)
If(Usb_setup_recived) -> ENUMERATION

the other part depen of your implementation
 

Re: configuring AT89C5131??

Hi!
i had initialized as mentioned. cool!!

6. Usb_var_init
what variables should be defined/ initialized here?

On monitoring the EP0 status register (UEPSTAX) i found that setup packet is received, so i think i'm on right track! pls respond!

regards,
srinivas
 

Re: configuring AT89C5131??

hi,
iam also working with at89c5131 can u send ckt and configuration prgm
 

Re: configuring AT89C5131??

Hi,

When you plug in the USB connector is the PC able to detect it?
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…