2012-04-19 10:39 PM
This Project might be interesting, is the CDC Usb Virtual Port Example
- that I modified to return ADC Reading values, and provide a simple Commands Shell Example, - which allow Reading and Writing of individual Port Pins. Page - see Virtual Com Project for Descriptrion and Download :[[this link/image has been flagged as malicious by our security scan software and has been deleted]]
Note: This Project is designed for implementing on the Stm32f4Discovery Board, and needs no additional parts. It uses the onboard Leds and User Button. But, the User is free to add a Potentiometer for ADC Testing.
The Project allows connection via USB to the PC as a Virtual Com Port. So, the User then simply opens up a Com Term program like HyperTerm on the PC - to directly talk to and Control the Board. It will immediately start sending ADC readings (x1/sec) from the PC0 port pin to the Com Term.
A simple Command Shell example is included that allows the User to: Disable/En the ADC readings, Read Port Pins, and Write Port Pins; - directly from the Command Terminal.
Commands below :
? - for Help Instructions ;
z/y - Disable / Enable auto ADC Readings ;
a-h 0-9/a-f - in LOWER Case - READS from the Port a-h of Pin 0-9/a-f (hex) ;
A-H 0-9/a-f 0/1 - in UPPER Case - WRITES to the Port A-H of Pin 0-9/a-f (hex) a Value of 0/1 ;
For example, enter 'a0' (without the appostrophies'') to Read PortA.Pin0 - which is the USER Button. And, it will return 0 or 1 depending if the Button is pressed or not.
Another example, enter 'DF1' to Write a 1 to PortD.Pin15 - which is the BLUE Led - which should Light. And, 'DF0' to turn off the Led.
The Project Instructions (in the root dir) even explain how to partially light the Leds.
:)
2012-04-25 02:36 PM
This is very interesting so I tried but my computer (Windows7 64bits) doesn't find virtual COM port. Do you have USB driver? In the _Instructions.txt ''Serial.inf Driver'' may be needed but I can't find that .inf file in the archive I downloaded. If you could help me about this that will be great!
Thank you for your help. Masahiro2012-04-25 04:15 PM
2012-06-04 11:29 AM
2012-06-05 01:38 AM
Okay Gandalf,
Let me see if I can find it, or modify the code with an alternate.2012-06-05 02:02 PM
2012-08-27 08:16 PM
2012-08-28 05:49 AM
The links have expired, use the email address to contact the poster.
2012-10-28 12:53 AM
2012-10-28 07:24 PM
To repeat, email the poster via the address on his page.