Tutorial 3: FAQ
Please find answers to the often raised questions I receive and issues I've faced myself about the Serial_LCD library suite on 4D Systems screens.
Why the 4D Systems screen?
When I considered purchasing a screen for my Arduino board, I defined what I was looking for:
On top of that, the user manual is well written and the support from Australia is very responsive. So I eventually developed the Serial_LCD library.
I haven't noticed better offer since my purchase. The serial connection and my library make 4D Systems screens very easy to use.
- colour LCD,
- touch,
- SD-card,
- dedicated graphic controller and most important,
- easy connection to the Arduino board using as fewer pins as possible.
On top of that, the user manual is well written and the support from Australia is very responsive. So I eventually developed the Serial_LCD library.
I haven't noticed better offer since my purchase. The serial connection and my library make 4D Systems screens very easy to use.
After resetting a sketch, the screen doesn't respond.
The screen has a hardware reset pin.
The begin() function has as an optional parameter the pin number for a hardware reset.
myLCD.begin(4)
In this example, pin 4 is used to reset the screen.
When using an I2C to serial bridge as the SC16IS750, I recommend avoiding using an IO from the main board. Use instead one of the 8 IO ports of SC16IS750. A specific function is on the roadmap.
The begin() function has as an optional parameter the pin number for a hardware reset.
myLCD.begin(4)
In this example, pin 4 is used to reset the screen.
When using an I2C to serial bridge as the SC16IS750, I recommend avoiding using an IO from the main board. Use instead one of the 8 IO ports of SC16IS750. A specific function is on the roadmap.
Which micro-SD to use?
Actually, the SD cards require to be prepared before being used with the dedicated 4D Systems FAT controller.
Before playing with files on the SD card, please check:
For more information about the SD card preparation, please refer to
RMPET Software Tool: Removable Media Partition Edit Tool (RMPET) can split a large card into two partitions, the first partition for use as a FAT16 partition and the second partition for use as a RAW partition.
I'm using two DaneElec micro-SD cards, one micro-SD 2 GB and another micro-SDHC 4 GB class 6. Both run fine. As both were given to me as gifts from my ISP, I guess they're low cost.
Before playing with files on the SD card, please check:
- The SD card is FAT16-formatted,
- partition size doesn't exceed 2 GB.
For more information about the SD card preparation, please refer to
- the Removable Media Partition Edit Tool (RMPET) page and
- the 4D-AN-1001: Partitioning a micro-SD into FAT and RAW Components application note,
RMPET Software Tool: Removable Media Partition Edit Tool (RMPET) can split a large card into two partitions, the first partition for use as a FAT16 partition and the second partition for use as a RAW partition.
I'm using two DaneElec micro-SD cards, one micro-SD 2 GB and another micro-SDHC 4 GB class 6. Both run fine. As both were given to me as gifts from my ISP, I guess they're low cost.
My screen doesn't light up.
My screen doesn't play sound.
The screen requires 150~200 mA to run, depending on the usage. Limited current may alter the screen use, as no sound, flickering background light.
Display with backlight on uses 180 mA, but playing sound requires up to 250 mA. For in-depth coverage, please refer to Hardware: Screen Consumption.
Many computers use cheap USB ports with limited current, mostly 100 mA instead of the full 500 mA they should supply. 100 mA current only affords supplying the Arduino board, but not the screen.
Too long an USB cable may have also an impact.
A good idea is to use rechargeable batteries.
Personally, I have a pack of 6 AA Eneloop 1900 mAh batteries. They are a bit more expensive than other rechargeable batteries but as expensive as high-end Alcaline disposable batteries. They but they offer better durability and keep full capacity even after a year of heavy use, as mine.
Another option consists on a separate power supply for the screen, keeping the ground shared.
Display with backlight on uses 180 mA, but playing sound requires up to 250 mA. For in-depth coverage, please refer to Hardware: Screen Consumption.
Many computers use cheap USB ports with limited current, mostly 100 mA instead of the full 500 mA they should supply. 100 mA current only affords supplying the Arduino board, but not the screen.
Too long an USB cable may have also an impact.
A good idea is to use rechargeable batteries.
Personally, I have a pack of 6 AA Eneloop 1900 mAh batteries. They are a bit more expensive than other rechargeable batteries but as expensive as high-end Alcaline disposable batteries. They but they offer better durability and keep full capacity even after a year of heavy use, as mine.
Another option consists on a separate power supply for the screen, keeping the ground shared.
My screen doesn't respond when I use faster serial speeds.
By default, standard speed is 9600 bps.
Using a faster speed is impacted by three parameters: main board, screen, and kind of serial port.
The cable between the Arduino board and the screen shouldn't exceed 20 cm or 8".
Using a faster speed is impacted by three parameters: main board, screen, and kind of serial port.
- 16 MHz Arduino tops at 38600 bps, for combined use of display and touch.
- 80 MHz chipKIT goes up to 57600 bps for display and touch and even 115200 for display only.
- I haven't tested yet the Wiring and MSP430 boards.
- Hardware port offers the most reliable serial connection.
- Software-simulated port can go messy, especially when bidirectional communication for display and touch.
- I2C port goes up to 57600 bps. A built-in buffer in the I2C-serial bridge brings better stability.
The cable between the Arduino board and the screen shouldn't exceed 20 cm or 8".
My screen hangs when I use touch.
Because the screen sends data for touch query, TX and RX data may collide. Try a lower speed as seen before.
|
Instead of testing myLCD.setTouchActivity() directly,
void loop() { if (myLCD.getTouchActivity()>0) { myLCD.getTouchXY(x, y); ... |
use a variable uint8_t c; in between:
uint8_t c; void loop() { c=myLCD.getTouchActivity(); if (c>0) { myLCD.getTouchXY(x, y); ... |
My screen doesn't work on a mega2560 using SoftwareSerial.
The SoftwareSerial library is based on the old NewSoftSerial, which code includes the following comment:
// Specifically for the Arduino Mega 2560 (or 1280 on the original Arduino Mega)
// A majority of the pins are NOT PCINTs, SO BE WARNED (i.e. you cannot use them as receive pins)
// Only pins available for RECEIVE (TRANSMIT can be on any pin):
// (I've deliberately left out pin mapping to the Hardware USARTs - seems senseless to me)
// Pins: 10, 11, 12, 13, 50, 51, 52, 53, 62, 63, 64, 65, 66, 67, 68, 69
So only the pins listed above can be used with SoftwareSerial on a mega2560 or mega1280.
// Specifically for the Arduino Mega 2560 (or 1280 on the original Arduino Mega)
// A majority of the pins are NOT PCINTs, SO BE WARNED (i.e. you cannot use them as receive pins)
// Only pins available for RECEIVE (TRANSMIT can be on any pin):
// (I've deliberately left out pin mapping to the Hardware USARTs - seems senseless to me)
// Pins: 10, 11, 12, 13, 50, 51, 52, 53, 62, 63, 64, 65, 66, 67, 68, 69
So only the pins listed above can be used with SoftwareSerial on a mega2560 or mega1280.