View Full Version : Teensy 2.0 LCD Smartie Serial Problem

01-07-2013, 04:28 PM

First I would like to thank Paul Stoffregen for developing such an awesome product!

I am working on a project that involves making a Samsung 20T202DA2JA serial VFD work properly with LCD Smartie (or other programs that use Matrix Orbital screens).

Sketch: https://github.com/WarriorRocker/vfduino/blob/master/vfduino.ino
Project Log: http://www.xodustech.com/projects/xodusampredux

I am having an issue though which I hope is just me overlooking something simple. I had this sketch working perfectly with the standard Arduino using an atmega328 however when I run the same code on the Teensy the communication with LCD Smartie results in text and characters being displayed improperly. (All text shows on the 2nd line of the display overlapping itself). Of course I changed the slaveSelectPin to 0 to match the spi pins on the teensy.

I am fairly confident this has to do with the way serial is implemented/handled with the teensy, writing data directly to the screen works eactly like it did on the Arduino. I can even still open the serial console and write text and have it display properly on the screen. I have tried using different baud rates and cpu speeds on the teensy which still results in the same garbled output.

I suspect that data is filling the buffer too quickly and not being read fast enough however the teensy is faster than the standard arduino so if anything it would be the arduino with the issue. I also noticed that when opening LCD Smartie the teensy doesnt automatically get reset like the arduino did, I am not sure if this is related or how exactly I would replicate that behavior with the teensy to see if it would help.

Thanks for taking a look and I appreciate in advance any help or insight you guys can give.

01-07-2013, 08:41 PM
I'm looking at the code you linked on github, which obviously has Uno's pin numbers. Can you post the actual code you tried on Teensy 2.0?

Did you also change irPin to pin 10? That's the pin IRremote uses on Teensy 2.0.


01-07-2013, 09:06 PM
Hey Paul,

I forgot to mention that I did change the pins versus the code uploaded. For reference here is the exact code I am using at the moment: http://www.xodustech.com/downloads/development/xodusamp.ino

Thanks for taking a look.

01-07-2013, 10:48 PM

Turns out there was a typo in one of the commands, instead of it setting the backlight to a lower level it sent the command to set 1 line operation. How that happened between me putting the code on my teensy I'll never know. Thanks for taking a look though and thanks again for such an excellent little device.