In this section we will try to give ideas on how to drive the UART from a PC
|
In this section we will try to give ideas on how to drive the UART from a PC
|
besides the simple implementation with RealTerm.
|
besides the simple implementation with RealTerm.
|
|
|
in the software folder of the project archive you will find:
|
in the software folder of the project archive you will find:
|
|
|
++ rtd_uart_test.bat :
|
++ rtd_uart_test.bat :
|
\ copy this bat file inside the RealTerm software folder to load the program (http://realterm.sourceforge.net/)
|
\ copy this bat file inside the RealTerm software folder to load the program (http://realterm.sourceforge.net/)
|
passing parameter settings (uart port, speed, display size, etc)
|
passing parameter settings (uart port, speed, display size, etc)
|
\ check "RealTerm_line_commands.txt" in the documentation folder for more parameters
|
\ check "RealTerm_line_commands.txt" in the documentation folder for more parameters
|
\ loads a file "Hex_commands.bin" (in BINARY format) and sends it over UART
|
\ loads a file "Hex_commands.bin" (in BINARY format) and sends it over UART
|
\ known strange behaviour of such method:
|
\ known strange behaviour of such method:
|
> COLS=18 doesn't set the number of columns to 18
|
> COLS=18 doesn't set the number of columns to 18
|
> relative paths or paths with "" don't work
|
> relative paths or paths with "" don't work
|
|
|
++ py_serial_control.py :
|
++ py_serial_control.py :
|
\ custom very simple script to read and write the UART with Python (http://www.python.org/doc)
|
\ custom very simple script to read and write the UART with Python (http://www.python.org/doc)
|
\ uses the pySerial library (http://pyserial.sourceforge.net/)
|
\ uses the pySerial library (http://pyserial.sourceforge.net/)
|
\ parses human readable parameters and translates them into the correct hex commands
|
> parses human readable parameters and translates them into the correct hex commands
|
> e.g: >> update --> 0x8000 0x00000000
|
e.g: >> update --> 0x8000 0x00000000
|
\ include a basic 'help' menu
|
include a basic 'help' menu
|
\ define your commands
|
\ Customize your script
|
\ DEFINE the number of registers to expect back after an update
|
> define your commands
|
|
> DEFINE the number of registers to expect back after an update
|
|
\ Browse to you script folder
|
|
> from a shell type: python py_serial_control.py
|
|
> enjoy ! :)
|
\ to be implemented:
|
\ to be implemented:
|
> load parameters and commands from files
|
> load parameters and commands from files
|
> improve readback print on screen formatting
|
> improve readback print on screen formatting
|
> make a generic nregister readout
|
> make a generic nregister readout
|
|
|
py_serial il Linux friendly! :)
|
py_serial il Linux friendly! :)
|
|
|