cancel
Showing results for 
Search instead for 
Did you mean: 

New Project Download - Virtual Com with Cmd Shell and ADC Reading

jlchoobs
Associate II
Posted on April 20, 2012 at 07:39

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.

:)

14 REPLIES 14
mkondo9
Associate
Posted on April 25, 2012 at 23:36

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.

Masahiro

jvilaca
Associate II
Posted on April 26, 2012 at 01:15

Thanks for sharing this example code.

anoop
Associate II
Posted on June 04, 2012 at 20:29

masahiro,

        did you find the serial.inf file after all? It would be appreciated if you put up the link if you've found the driver.

-gandalf

jlchoobs
Associate II
Posted on June 05, 2012 at 10:38

Okay Gandalf,

Let me see if I can find it, or modify the code with an alternate.

mkondo9
Associate
Posted on June 05, 2012 at 23:02

Hi gandalf

I downloaded USB driver from

http://www.st.com/stonline/stappl/resourceSelector/app?page=resourceSelector&doctype=SW_DRIVER&FamilyID=141

At least my PC detected STM32 discovery and I could run the example posted and could read ADC. But it was unstable, which means sometimes it works but sometimes it doesn't... I hope the originator will post updated version for this.
sreejaya
Associate II
Posted on August 28, 2012 at 05:16

Hi,

    I tried downloading the sample code through the link mentioned below. But I am not able to access it as it redirects me to download  a different XLsheet file. Is there any other alternative to download the code?

Regards,

Sree

Posted on August 28, 2012 at 14:49

The links have expired, use the email address to contact the poster.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
psej
Associate
Posted on October 28, 2012 at 08:53

Posted on October 29, 2012 at 03:24

To repeat, email the poster via the address on his page.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..