Implementing USB using the SPI on 9S08AW60

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Implementing USB using the SPI on 9S08AW60

1,502 Views
MWMinor
Contributor V

Hi All

 

I'm a relatively new user to these products, but have successfully managed to get the DEMO board I purchased to talk to an LCD display. I'd now like to add a USB interface to the design and assumed it would be relatively straight forward.

 

I chose a MAX3420E USB interface chip and making the physical connections between the DEMO board that part comes with and the appropriate port E pins of the MCU to link up the SPI interface was easy.

 

But I'm struggling with the place to start for the coding.

 

Both Freescale and MAXIM literature implies the whole process is "simple" - but it seems to be anything but.

 

Can anyone please point me in the right direction with this...?

 

I've looked at the MQX software from Freescale (and installed it on my machine) it seems incredibly complicated - but is this where I need to be...?

 

Any assistance would be appreciated.

 

Ken

Labels (1)
0 Kudos
Reply
4 Replies

1,154 Views
bigmac
Specialist III

Hello Ken,

 

There appears to be two different issues involved -

 

  1. Providing generalised SPI master driver code, to communicate with any SPI slave peripheral. This part is simple, as the attached code demonstrates.
  2. Providing code for the correct sequence of data transfers to control the USB device, and accomplish various tasks.  This is complex, and difficult to understand IMHO.

I do not think that the MQX software will be helpful, in either instance.  You are dealing with a third-party device that will certainly differ from the use of a Freescale MCU with integral USB capability.  Perhaps Maxim can supply demonstration code for the device.

 

I would assume that a good understanding of USB operational details would still be necessary to use this device, as would also be required to use the USB module within a MCU.

 

Regards,

Mac

 

0 Kudos
Reply

1,154 Views
MWMinor
Contributor V

Hi Mac

 

Many thanks for responding to my question.

 

As I indicated previously, we are at the early stages of development for this new product. I chose the MC9S08AW because it seemed to offer lots of I/O and internal ADC. There were just so many to choose from, and with the SPI interface I thought it would be simple (relative) to add USB.

 

But USB is goiung to be an important feature for many of our new products.

 

In your opinion should I jump now to something like the JM60 - which looks like it has USB already implemented - before developing too much more on the AW60 platform...?

 

 

0 Kudos
Reply

1,154 Views
rocco
Senior Contributor II

Hi Ken,


MW Minor wrote:

In your opinion should I jump now to something like the JM60 - which looks like it has USB already implemented - before developing too much more on the AW60 platform...?


I'm not Mac, but I do have an opinion.

 

I have done some USB devices, and unless you are doing a simple com-port emulation, there will be a lot of code involved. The problem with something like that Maxim chip is that it works with many microcontrollers, and it is therefore impractical for Maxim to provide the USB stack for them all. A chip like the JM60, besides being more integrated, also has more USB stack code available.

 

Also, if you should need the USB full-speed rate of 12 megabits-per-second, the AW60 SPI will not keep up. However, I'm not sure if the JM60 would keep up either.

0 Kudos
Reply

1,154 Views
MWMinor
Contributor V

Hi

 

Thanks for the opinion.

 

We're not looking for anything high-speed - but as we're new to the use of MCU's and implementing a USB interface, we're certainly looking for the path of least resistance.

 

We've order a JM60 demo board and will take a look at that today.

 

Thanks again

0 Kudos
Reply