SparkFun Forums 

Where electronics enthusiasts find answers.

Topics pertaining to the Arduino Core & software used with the Artemis module and Artemis development boards.
#209179
I'm using an Artemis ATP with the uLCD-32PTU. I have a sketch that works fine with an Arduino Mega 2560: stable for weeks at a time. Since my project will be using several qwiic boards, I switched to the Artemis ATP with qwiic connectivity. The issue is that I am communicating with the uLCD on Serial3 of the Arduino Mega at a baud rate of 200000 and everything works fine, when I moved to the ATP I switched to Serial1 at a baud rate of 200000 and the uLCD only receives the first write to it before locking up. I tried faster and slower baud rates with no luck. In fact, the only time it works at all is at 200000, but again it only response to the first command.
#215882
I was thumbing through the Forum, and happened to notice your post. Although I haven't used the Artemis much, and am not familiar with the particular LCD you're using, I have done some "low level" programming for LCDs in the past.

I strongly encourage you to review the data sheet for the LCD (and its controller chip). One of the things that I've run into is that the LCD's "on board" controller can take some time to execute commands, and if it sees the next command before it completes the current one, it will ignore portions of it, meaning that it's now "out of sync" and the only reliable way to get it back into sync is to do a hardware reset (often this means a power cycle).

Since the Artemis is much faster than the Arduino Mega, it may be trying to send the second command to the LCD before the LCD is ready, but the Mega's slower processor doesn't get around to sending quite as quickly. You might consider just "brute forcing" it by putting in a "delay()" statement. Off hand, if I remember correctly, the slowest LCDs I've seen (from the past millenium ) took about 40mS to execute a "clear screen", which was the slowest command. Modern ones are likely faster, but I haven't had to deal with them in many years.
 Topic permissions

You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum