I am a student at ECPI University taking a Microcontrollers class. This class uses the MC9S12DG256 for all of their projects. I am attempting a large project to turn the MC9S12DG256 into a music player. One of the things I am looking into is whether I can interface a USB flash drive to the MC9S12DG256 running in host mode to read .mp3 files or .wav file off the flash drive. From what I have seen I am not sure if the 2nd USB port on that development board will support high enough speed transfers to the MC9S12DG256 to play music. It appears that P2 is connected through SCI1 which seems to be limited to 56k. I stumbled across your documentation for your USB stack, but it looks like you don’t support the MC9S12DG256 for HOST mode that I need to access a flash drive. The documentation states that there is not enough memory. If I could get the USB stack working on the MC9S12DG256 in host mode at a high enough speed I could complete my project. My questions to you are: 1) Can the MC9S12DG256 support 1.5+mbps transfers over USB?; 2) Will your USB stack fit if I limit it to just the HOST, MSD, and file system parts?; 3) If there is some hope that the USB stack will work, where can I get a copy at a reasonable price or free so that I can incorporate it in my project?
Hi John,
Could you tell me, please which board do you use?
The MC9S12DG256 doesn't have USB module.
Best Regards,
Diana
Hi Diana,
I am using the MC9S12DG256 which has 2 USB type A connectors on it. One of these is normally used to connect to my PC for interaction with CodeView. On my PC I have to run a USB Serial Converter, so it’s possible that even though it is a USB Type A connector it’s not a true USB connection. There is a switch somewhere on the board to tell it whether you are doing USB to CodeView over P1 or P2, but it’s unclear what that switch does or even where it is. According to the documentation the second USB Type A connector (P2) is connected to SCI1 which is a UART interface that only supports 56k. I was hoping that there is a way to switch that to use SPI0, 1, or 2 since that subsystem supports 1.5mb transfers. My other option that I have been looking into is adding a real USB chip (on the Dragon-12 breadboard) and wiring it into some available I/O ports, but that would probably require some low level changes to your USB stack software to get it to work. I might be willing to make those changes myself if it’s not too difficult. But I only have 3 weeks left to complete this project. Any recommendations on a direction to head or what USB chip would work best would be greatly appreciated. Keep in mind that unfortunately I can only use the MC9S12DG256 in this class.
John
Hi John,
We have never seen your board so we can't say what it supports. But the MCU MC9S12DG256 doesn't have USB peripheral only SCI, SPI...
If you are able to communicate with the MCU SCI module from your PC over USB there must a chip that emulates serial bus on USB. If you need to use SPI of the MC9S12DG256 you will probably need to have some USB to SPI converter. I'm not familiar with these devices but I found, for example, this one: EVK USB-SPI Interface, MC68HC908|NXP
Regards,
Daniel