Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
10 years, 9 months ago.
Serial connection between STM32F030R8T6 and led screen
Hello Team, I'm trying to use a led screen (noritake gu112x16g-7003) on my board (STM32F030R8T6) via serial link (UART). I connected it to the pins tx and rx (PA_2,PA_3) and at the alimentation and ground. I tried to use "Nucleo_printf" code but it doesn't work! The screen doesn't give signs of life. I read that I should open the serial port before send something, is it already open with this code?
Serial pc(SERIAL_TX, SERIAL_RX);
Can you help me? I don't understand what's the problem!
1 Answer
10 years, 9 months ago.
In the default setup of the nucleo boards the PA_2 and PA_3 pins are connected to the USB serial interface provided by the ST-Link hardware. This allows you to print messages on the Host PC. So the pins D0/rx and D1/tx are not connected to PA_3 and PA_2. When you want to connect external hardware to a serial port you should either modify the board to connect D0/D1 to PA_3/PA_2 or use an alternative serial port D2/PA_10/rx and D10/PB_6/tx. See the diagram of the F030 here.
You can use this code to add a second serial port and still use the host pc serial for debugging:
Serial noritake(PB_6,PA_10); Serial pc(SERIAL_TX, SERIAL_RX);
Oh ok I understand. The code doesn't works because PA_9 is "Serial 1 TX" but I need of PA_10 ("Serial 1 RX"). So if I use this code it works
Serial pc(SERIAL_TX, SERIAL_RX); Serial noritake(PB_6,PA_10);
but an other question: How can I use the reset pin? Where should I connect it? And what kind of code should I use?
posted by 09 Jan 2015You are right about PA_10. I mixed up the pinlabel. Example above was fixed. The display is a VFD and not and LED type. I dont have the full datasheet but it seems to need only the serial input (SIN) pin. The reset pin can problably be left unconnected as it will reset on power-up. Alternatively you could use one of the nucleo's digital out pins to reset the display.
DigitalOut reset(PA_8); int main { reset=0; wait(0.1); //generate a 0.1 second low pulse reset=1; //continue to init and drive the display }
Google will probably lead to some example code for the display.
posted by 09 Jan 2015
I was connected STM32F030R8T6 to xbee and now I was asked to transmit and receive data. For this what should I do. In which type (or) compiler I should do programme in C language. How should I start doing this ?
posted by billa rakesh 20 Jun 2019