print data to different terminal IAR - c

I am working on a project which contains acquisition of ECG data with the ADS1293EVM. MSP430F5529 is part of this board as well. For the communication between analog part of the board and microcontroller, I am using SPI and there is also FET Debugger from TI to program the microcontroller. Now I am printing data using printf to a terminal I/O which is part of the IAR software.
However, I would like to print ECG data to the terminal app in PC or to LabView, not in Terminal I/O in IAR software. The board is connected to the PC by USB so there is UART port in device manager. Is there any possibility?

Yes it is possible. You can push all the data on UART which is used in communication between PCB and PC. Than you can use any serial monitor for getting data displayed.

The only connection between your board and the PC is USB, so you have to implement a virtual USB COM port (CDC). TI's USB stack implements such an interface.

Related

Serial Port Terminal

I am programming a MAX32 Micro controller in MPLAB. I want to use the UART protocol to interact with my terminal (I am developing on a mac). Is this possible? Can someone point me in the right direction to get started?
Read Wikipedia UART Article
Read Reference Manual of your µC, Chapter "...UART..."
Get example Code for this issue from your Reference Manual or Programming Manual or Internet Articles
Program your board
Connect your Board with your PC via Cable (USB, RS232 to USB (virtual RS232) or UART to USB)
Open Terminal Program i.e. TeraTerm
Check your Settings i.e. Baud Rate
Try it

Linux Serial Device Server over USB?

I have an embedded Linux solution and want to create a command service over serial USB. The idea being that when a computer connects to my embedded via USB, they see a serial device and send serial commands to me through that port and I send responses back.
I need some help in the direction to proceed. Do I need to emulate a serial device so they see me as a COM port? Is there build in Linux solutions to broadcast my details as a serial device? Are there code examples? I can see block devices connect with my embedded solution like a USB storage device. When I plug into another computer, I would like it to see me as a serial COM port.
I just need help in the direction of which path I should go down to solve this.
Thanks in advance.
What you are looking for is the Linux USB serial gadget. The Linux USB gadgets framework allows devices to behave as a variety of standard USB devices, including serial devices, Ethernet adapters, and mass storage devices.
Note that USB gadgets will only work on targets with a USB controller that can be set to operate as a USB device. Not all USB controllers and target devices are compatible with this configuration. For instance, most PCs have a host-only USB controller, and the Raspberry Pi Model B is not compatible with gadgets because it contains an embedded USB hub upstream of the USB ports. (However, the Pi Zero is fully compatible with gadgets.)

ATSAM4s8b, how to wait until a usb device has been connected

I am very new to C and embedded programming.
I simply want to have my main thread wait until a usb device has been plugged in to my embedded device.
However, no matter how hard I look, I cant find documentation or examples about how to check if the usb has been plugged in.
I am using a ATSAM4S8B.
EDIT:
Actually I think the usb capabilities are built into the chip, I can use Atmel ASF libraries.
I am hoping that there is just a library function I can call to see if the usb has been connected too but I can't find anything like it.
There are two ways of detecting USB connection:
waiting for usb events occure and special USB flags to fire in hardware registers, which will signal if initiating process started. This solution depends on a particular chip you use and firmware burnt into MCU.
use sense IO pin. Attach USB 5V through 1k resistor to a pin of the MCU. High level on the pin will indicate, that USB was connected. Dont forget to use high value (>10k) pull-down resistor, which will pull the input low when USB disconnected.

How to dump/burn program into LPC2148

I have LPC2148 daughter board but I am not able to dump/burn code into it, and it doesn't have any usb connector to dump code.
I read on internet by using FT232RL I can able dump code into LPC2148 but I am not able to do so.
please give me solution
thank you..!
The chip supports In-System Programming (ISP) via an on-chip boot loader ROM.
From the User Manual UM10139:
Programming of the Flash memory may be accomplished in several ways:
over the serial built-in JTAG interface, using In System Programming
(ISP) and UART0, or by means of In Application Programming (IAP)
capabilities.
The function of the FT232RL you mentioned is to act as a USB/UART bridge and is necessary primarily because modern PCs lack legacy RS-232 serial ports. You can in fact purchase a USB-Serial cable or adapter which will contain a bridge chip such as the FT232RL. Most of these use RS-232 line level signals, so you would still need an RS-232 line driver/receiver to connect then to your board (if your board has a serial port, it probably already has a line transceiver and you can connect directly to that). It is possible from specialist suppliers including FTDI themselves to get a USB cable with integrated FT232 and bare TTL level connections to connect directly to LPC2148 UART0 Rx/Tx lines.
If your board does not already expose a UART0 serial port and the necessart control to start the boot loader, a Serial Port Bootloader Interface board is available. For that you may then also need a USB/Serial adapter or a PC with a legacy serial ports.
Once you have a suitable serial connection, you will need the LPC2000 Flash Utility software to run on the PC.
The JTAG option is however faster, and more powerful since the JTAG is both a programming and debugging port. With a suitable toolchain and JTAG adapter it is possible to program and execute code with source-level PC hosted debugging including break pointing, data watching and single stepping of the code.

How to read data from USB port using C

I have sensor node connected to USB port that sense temperature, humidity and light and send the data to PC.
What piece of code will help me to read that data from the USB port in normal C.
Application of the nodes is built on C using Eclipse.
I looked into the specifications of your board and it seems like it's a FTDI chip. This means it's exactly the same way you read from a serial port.
Here is how you program the serial port in Windows (it hasn't changed in a long time).

Resources