STM32F103C Words encoding

Generic boards that are not Maple or Maple mini clones, and don't contain the additional USB reset hardware
Post Reply
Himamote
Posts: 3
Joined: Thu Feb 16, 2017 3:23 am

STM32F103C Words encoding

Post by Himamote » Thu Feb 16, 2017 12:43 pm

Hi, I'm new to programming, and I have been trying to use LCD by using the code from here,
https://www.arduino.cc/en/Tutorial/HelloWorld
and I thought this was pretty simple. However, the words shown on the display is not encoded correctly, and it shows some random letters instead of what I have programmed. In addition, at the serial monitor, when I send something to STM32F103C, it replies back in question marks.
Is there any solution for this? I'm using mac book pro 2012, with Arduino IDE 1.8.1
Thank you!
Attachments
IMG_2039 copy.jpg
IMG_2039 copy.jpg (38.93 KiB) Viewed 401 times

stevestrong
Posts: 1445
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany

Re: STM32F103C Words encoding

Post by stevestrong » Thu Feb 16, 2017 12:54 pm

Which display?
Which display library?

Himamote
Posts: 3
Joined: Thu Feb 16, 2017 3:23 am

Re: STM32F103C Words encoding

Post by Himamote » Fri Feb 17, 2017 8:56 am

stevestrong wrote:Which display?
Which display library?
I'm using the display called 1602A, and "LiquidCrystal.h" as a library.

stevestrong
Posts: 1445
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany

Re: STM32F103C Words encoding

Post by stevestrong » Fri Feb 17, 2017 9:46 am

And where is the software?
Should we just imagine how it should look like?
If you don't post complete information, how do you think we can help you?

Assuming that you use the same sketch as shown on the linked page, it would be useful to check the used pins and the connections wires and how exactly you modified the sketch for the used pins.

stevestrong
Posts: 1445
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany

Re: STM32F103C Words encoding

Post by stevestrong » Fri Feb 17, 2017 12:27 pm

In addition, please use the PXY (PA8 for example) notation when using the GPIO pins, instead of using pure numbers (like 2, 6, 13).

Himamote
Posts: 3
Joined: Thu Feb 16, 2017 3:23 am

Re: STM32F103C Words encoding

Post by Himamote » Fri Feb 17, 2017 1:29 pm

stevestrong wrote:In addition, please use the PXY (PA8 for example) notation when using the GPIO pins, instead of using pure numbers (like 2, 6, 13).
Hi, thank you for the reply, below is the exact copy of the code that I used when I took the photo
I used https://learn.adafruit.com/assets/2364 this wiring as a reference, and replaced wiring using PB7~12 for UNO's number 7~12pins respectively

Code: Select all

#include <LiquidCrystal.h>


LiquidCrystal lcd(PB7, PB8, PB9, PB10, PB11, PB12);

void setup() {
  lcd.begin(16, 2);
  lcd.print("hello, world!");
  
}

void loop() {
  lcd.setCursor(0, 1);
  lcd.print(millis() / 1000);
}

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest