Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 6 of 6

Thread: Lcd st7063c on teensy 3.2

  1. #1
    Junior Member
    Join Date
    Apr 2020
    Posts
    5

    Lcd st7063c on teensy 3.2

    Hi everyone my name is joe and im traying to make work this lcd 202a controller ST7063c 20x2 lines on a teensy 3.2
    i wanna do a pinnumber counter of 4 or 6 digits.

    i try the example lcdliquidcristal conecting the pins 2,3,4,5,11,12 but dont show nothing on the lcd.
    i search for something related to the st7063c but no luck , any one can help me

    the lcd power up but nothing to show

  2. #2
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    10,316
    Hi Joe,

    As mentioned in the forum rules at top of page, it often helps us to see the code to get an idea of what is going on.

    Also helps to post a picture of your setup, as this often helps to uncover simple issues, like trying to use a breadboard and not have the Teensy soldered to the pins or, maybe missing wires. Like power or ground.

    Also a link to the actual display, would also help as there might be some hints up on their product page, like does their display require 5v...

    Again welcome

  3. #3
    Junior Member
    Join Date
    Apr 2020
    Posts
    5
    this the display datasheet
    https://cdn.displaytech-us.com/sites...series-v21.pdf

    this is the configuration i try
    Click image for larger version. 

Name:	td_libs_LiquidCrystalFast.jpg 
Views:	68 
Size:	75.1 KB 
ID:	19573

    and this my setup so far the cable pin 3 can be conected direct to the power?
    Click image for larger version. 

Name:	setup.jpg 
Views:	41 
Size:	27.5 KB 
ID:	19574
    cables 14 to pin 2 on teensy
    cable 13 to pin 3
    cable 12 to pin 4
    cable 11 to pin 5
    cable 4 to pin 11
    cable 6 to pin 12
    cable 1 to grnd
    cable 2 to power
    cable 5 to grnd

    Code:
    // include the library code:
    #include <LiquidCrystal.h>
    
    // initialize the library with the numbers of the interface pins
    LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
    
    void setup() {
      // set up the LCD's number of rows and columns: 
      lcd.begin(16, 2);
      // Print a message to the LCD.
      lcd.print("hello, world!");
    }
    
    void loop() {
      // set the cursor to column 0, line 1
      // (note: line 1 is the second row, since counting begins with 0):
      lcd.setCursor(0, 1);
      // print the number of seconds since reset:
      lcd.print(millis()/1000);
    }

  4. #4
    Senior Member
    Join Date
    May 2017
    Posts
    125
    Hello,

    you should not connect cable3 direct to power..
    Use instead a 10K potentiometer between power and ground, connect the wiper with cable 3. This is to set the contrast. Maybe you don't see anything for this reason.

    Also this LCD is for 5 Volt power supply. teensy3.2 has 3.3V logic, so even though it is 5V compatible, communication might not work. Maybe use teensy 2 instead.

  5. #5
    Junior Member
    Join Date
    Apr 2020
    Posts
    5

    great

    ok ive try to find one petentiometer and try thanks alot man
    Quote Originally Posted by larry_berlin View Post
    Hello,

    you should not connect cable3 direct to power..
    Use instead a 10K potentiometer between power and ground, connect the wiper with cable 3. This is to set the contrast. Maybe you don't see anything for this reason.

    Also this LCD is for 5 Volt power supply. teensy3.2 has 3.3V logic, so even though it is 5V compatible, communication might not work. Maybe use teensy 2 instead.

  6. #6
    Junior Member
    Join Date
    Apr 2020
    Posts
    5
    now the 2nd part of the project

    i wanna run this code and see the 4 numbers any onecan help me how i set up the lcd and the code together
    Code:
    const int ledPin = 13; // choose the pin for the LED
    int counter = 0;
    int fakecounter = counter;
    char pin[]="xxxx";
    
    void setup() {
      pinMode(ledPin, OUTPUT); // declare LED as output
      delay(10000);
    }
    
    void loop(){
      keyboard_modifier_keys = 0;
      if (counter <= 9999){
        delay(8000);
        digitalWrite(ledPin, LOW);
        delay(5500);
        digitalWrite(ledPin, HIGH);
        sprintf(pin, "%04d", fakecounter);
        //sending first digit
        Keyboard.press(pin[0]);
        delay(450);
        Keyboard.release(pin[0]);
        delay(420);
        //sending second digit
        Keyboard.press(pin[1]);
        delay(398);
        Keyboard.release(pin[1]);
        delay(510);
        //sending third digit
        Keyboard.press(pin[2]);
        delay(421);
        Keyboard.release(pin[2]);
        delay(423);
        //sending forth digit
        Keyboard.press(pin[3]);
        delay(430);
        Keyboard.release(pin[3]);
        delay(525);
        //sending enter
        Keyboard.press(KEY_ENTER);
        delay(305);
        Keyboard.release(KEY_ENTER);
      }
      //reached 4 digit PIN max value
      if (counter > 9999){
        for (int blinkies = 0; blinkies < 8; blinkies++) {
          digitalWrite(ledPin, HIGH);
          delay(20);
          digitalWrite(ledPin, LOW);
         delay(200);
        }
        delay(6000);
      }
      ++counter;
      fakecounter = counter;
    }

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •