Teensy3.0 locking up with liquidcrystalfast

Status
Not open for further replies.

Macona

Active member
Loaded up the hello world example to drive a vfd. About 7 out of 10 times it locks up at reboot. This will happen on a cold boot or a software reboot. Unplug it and plug it in a few times and it will boot fully.

When it locks up it gets to the W in hello world. When this happens it never shows up as a serial port nor can it be reprogrammed until you reset it and get it to fully boot. Any ideas?

-Jerry


Teensy lockup. by macona, on Flickr
 
Is the Teensy getting clean power? Could there be a cold solder joint somewhere? Are you able to test the Teensy without the display hooked up using Serial.print() or blinking the LED on pin 13?
 
I've used LiquidCrystalFast on Teensy 2, 3.0 and 3.1 and never had it lock up.
Can you post your code (in code tags please)?

Pete
 
I should have mentioned that I have tried two Teensy 3.0s and they both do the same. The power is clean, I have checked it with a scope and tried different power supplies. Im going to try the other version of the library to see if it makes a difference and maybe try the newer LCD Library. I have never had an issue with these VFDs before, I have used them with Teensy 1s and 2s with no problems.

-Jerry

Code:
/*
  LiquidCrystalFast Library - Hello World
 
 Demonstrates the use a 16x2 LCD display.  The LiquidCrystalFast
 library works with all LCD displays that are compatible with the 
 Hitachi HD44780 driver. There are many of them out there, and you
 can usually tell them by the 16-pin interface.
 
 This sketch prints "Hello World!" to the LCD
 and shows the time.
 
  The circuit:
 * LCD RS pin to digital pin 12
 * LCD WR pin to digital pin 10
 * LCD Enable pin to digital pin 11
 * LCD D4 pin to digital pin 5
 * LCD D5 pin to digital pin 4
 * LCD D6 pin to digital pin 3
 * LCD D7 pin to digital pin 2
 * 10K resistor:
 * ends to +5V and ground
 * wiper to LCD VO pin (pin 3)
 
 Library originally added 18 Apr 2008
 by David A. Mellis
 library modified 5 Jul 2009
 by Limor Fried (http://www.ladyada.net)
 example added 9 Jul 2009
 by Tom Igoe
 modified 25 July 2009
 by David A. Mellis
 
 http://www.pjrc.com/teensy/td_libs_LiquidCrystal.html
 http://www.arduino.cc/en/Tutorial/LiquidCrystal
 */

// include the library code:
#include <LiquidCrystalFast.h>

// initialize the library with the numbers of the interface pins
LiquidCrystalFast lcd(33, 32, 31, 30, 29, 28, 27);
         // LCD pins: RS  RW  EN  D4 D5 D6 D7

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);
}
 
It's not just a matter of the display not working. I set some hard written analog write values to the pins to the mosfet drivers and when the teensy locks up there is no output to the pins.
 
It suggests that the chip is getting a hard reset. The code itself isn't complicated enough to crash the chip and reset it, so all I can think of is to double-check the connections at the pad for pin 29, and for pins 13 and 14, which are all close to the reset pin on the T3.

Pete
 
It suggests that the chip is getting a hard reset. The code itself isn't complicated enough to crash the chip and reset it, so all I can think of is to double-check the connections at the pad for pin 29, and for pins 13 and 14, which are all close to the reset pin on the T3.

Pete

I updated to the new liquidcrystal library and that seems to have done the trick. I have not gotten one lock up.
 
It looks like it is an issue with LiquidCrystalFast and Teensy 3.0. I reprogrammed it with the generic LiquidCrystal library that comes with the teensyduino package. I changed it from liquidcrystalfast to liquidcrystal and the hangups stopped. Switched it back to fast and the hanging started up again.

I can bring it to dorkbot tomorrow if you want.

-Jerry
 
Status
Not open for further replies.
Back
Top