Hi there. I need some help with moving on with my university project. I would really appreciate any guidance and tips from experienced programmers and designers.
My project involves getting the information from the outside world (force acting on piezo), converting it to digital signal and interfacing it with a computer for further processing probably with PD.
Now, I know how to connect everything and perform ADC but I am stuck at the stage of connecting to the computer via USB. I have some basic knowledge about it but need to know how to set up the connection between micro and PC. Does it require a lot of configuration (host etc). I'm not sure how to write the code that would put the ADC data on the USB and how to set up PC to receive it.
I will be using RS08 KA8 microcontroller. Can anybody give me some points where to start, maybe some similar projects? I spent the whole day searching on the internet but without any results.
ANY help is very much appreciated!
Regards
Might I say FTDI?
ive used their sci to usb chips and it is pretty good
for your mcu it is only a serial communication
for the pc side you can go with a virtual com port (which work but look less professional)
or write your own driver and application
Hi guys, thanks for reply again. I am using now MC9S08QG8. It supports SCI and I got a development board from my department. It's not an official one so doesnt have USB or RS232.
Im going to go for serial rs232 and then USB converter design.
Just one question, I know that rs232 is using different levels of voltages and it requires the max chip as well. However some say it is not necessarily to implement it. Providing I would hav r232 to USB converter should i add the max chip as well, if yes does it matter which one?
Any other things I should consider as well?
Thanks
Magic
Dear Magic86,
Its difficult to give a definitive answer without more details. I hope the following is sufficient:
There are two scenarios:
1. You are using a 'bare' FTDI chip and a bare 'CPU' i.e. no RS232 line level converters at either end. You would need to make sure that the voltage levels used by the FTDI I/O signals agree with the expected levels of the CPU. In your case this would be 3V3 for both ends I expect. The FTDI chips support both 3V3 and 5V (from memory). It is possible to get convenient FTDI modules that would work in this scenario. e.g. http://www.ftdichip.com/Products/EvaluationKits/TTL-232R-3V3.htm
2 You are using a USB-to-RS232 converter cable (readily available PC cables). These produce RS-232 level signals (around +/-9V!) so it would be necessary to use a RS232 level converter IC between the cable and the micro. e.g. MAX3232
bye
Hello, and welcome to the forum.
The RS08KA8 is probably a poor choice for this project. Let me explain further.
To achieve a USB connection to a PC, there are two alternatives:
In addition, the RS08 devices, compared with S08 devices, are more difficult to program in assembly code, and do not particularly lend themselves to C programming because of the lack of a stack within the device.
I would suggest that you choose an S08 device for this project, either containing a USB module, or alternatively containing at least a SCI module for the second alternative above. I assume that you would be purchasing an evaluation board for this project, rather than "rolling your own" circuit board layout.
Regards,
Mac
Hi Bigmac!
Sorry for the late reply. Thanks a lot for your advice it is very helpful. I will re-plan my project in terms of the mcu. We have the development boards and USB multilink cables so that wont be a problem.
Is it not possible to just to attach USB module to the mcu board, like power ground and 2 data pins? Or is it easier to go for RS232 and then USB converter?
Thanks
Hello,
For direct USB interface, you might consider using the demo board for the MC9S08JM60 device. However, the USB module is relatively complex to program, certainly more so than the SCI module.
You would also need to consider what additional programming needs to be done on the PC side.
Regards,
Mac