AnsweredAssumed Answered

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

Question asked by jlc.jlsilicon on Apr 19, 2012
This Project 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.