Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed timing of pulses #4

Closed
wants to merge 2 commits into from
Closed

Conversation

ajvdw
Copy link

@ajvdw ajvdw commented May 24, 2016

// Due to inaccurate timing, skipping pulses. Results scrambled screen
// (http://arduino.cc/en/Reference/delayMicroseconds)

// Due to inaccurate timing, skipping pulses. Results scrambled screen 
// (http://arduino.cc/en/Reference/delayMicroseconds)
@ajvdw ajvdw changed the title Update LiquidCrystal.cpp Changed timing of pulses Jun 5, 2016
@CLAassistant
Copy link

CLAassistant commented Apr 9, 2021

CLA assistant check
All committers have signed the CLA.

@HattonLe
Copy link

Can someone move this on from "pending" as it is a needed fix. I had the same problem on my project and luckily found this as the correct solution.

@per1234 per1234 added type: imperfection Perceived defect in any part of project topic: code Related to content of the project itself labels Apr 18, 2022
@per1234
Copy link
Contributor

per1234 commented Apr 18, 2022

The reason for the "pending" state is that Arduino now has a policy that all contributors must sign our Contributor License Agreement (CLA).

@ajvdw can sign the CLA by clicking the "Contributor License Agreement" link in the comment by the @CLAassistant bot above. That will trigger another validation operation by the bot and it should change the state from pending once that check is passing.

Arduino also has a policy that one of the developers must review and approve the proposal before it can be accepted. Since this pull request was opened years before the automated CLA checking system was put in place, the lack of a review and approval is the more fundamental reason why this is not merged. However, it is likely that the pull requests without a passing CLA check will not be given priority for review, since they couldn't be merged even with an approving review.

@ajvdw or any other interested parties could help out with that by providing more detailed information and definitive references (e.g., official datasheets).

Thousands of people have surely used this common library without having such a problem (myself included), otherwise we would have many bug reports about it here and on the forum. Yet I haven't seen them. So what are the specific conditions under which a pulse duration is required that is an order of magnitude longer than the minimum indicated in the comment?

@per1234
Copy link
Contributor

per1234 commented Apr 18, 2022

It looks like there is an alternative proposal at #14 and some related discussion at its original pull request thread.

@HattonLe
Copy link

Hi. I understand the reasons for a CLA but since I am not @ajvdw I wouldn't be able to advance this request.
Thousands of people probably don't refresh their LCD display contents enough to see the problem. If you read the Arduino delaymicroseconds() documentation it specifically states "We cannot assure that delayMicroseconds will perform precisely for smaller delay-times", i.e. using delaymicroseconds(1) is not guaranteed to wait for 1 microsecond; it could in fact return instantly. If the latter occurs the LCD communications protocol would then be out of spec - which is why the LCD get completely garbled. This solution solves the issue without causing any side effects as it even retains the same execution duration. (actually in theory it will have a more reliable execution duration since delaymicroseconds() will be operating within its specified parameters). A belated thank you to @ajvdw whereever you are for nailing this one :o)

@github-actions
Copy link

Memory usage change @ ec31f82

Board flash % RAM for global variables %
arduino:avr:leonardo 🔺 +28 - +28 +0.1 - +0.1 0 - 0 0.0 - 0.0
arduino:avr:mega 🔺 +28 - +28 +0.01 - +0.01 0 - 0 0.0 - 0.0
arduino:avr:nano 🔺 +28 - +28 +0.09 - +0.09 0 - 0 0.0 - 0.0
arduino:mbed_nano:nano33ble 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:mbed_nano:nanorp2040connect 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:mbed_portenta:envie_m4 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:mbed_portenta:envie_m7 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:megaavr:nona4809 🔺 +28 - +28 +0.06 - +0.06 0 - 0 0.0 - 0.0
arduino:sam:arduino_due_x_dbg 0 - 0 0.0 - 0.0 N/A N/A
arduino:samd:mkrzero 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
Click for full report table
Board examples/Autoscroll
flash
% examples/Autoscroll
RAM for global variables
% examples/Blink
flash
% examples/Blink
RAM for global variables
% examples/Cursor
flash
% examples/Cursor
RAM for global variables
% examples/CustomCharacter
flash
% examples/CustomCharacter
RAM for global variables
% examples/Display
flash
% examples/Display
RAM for global variables
% examples/HelloWorld
flash
% examples/HelloWorld
RAM for global variables
% examples/Scroll
flash
% examples/Scroll
RAM for global variables
% examples/SerialDisplay
flash
% examples/SerialDisplay
RAM for global variables
% examples/TextDirection
flash
% examples/TextDirection
RAM for global variables
% examples/setCursor
flash
% examples/setCursor
RAM for global variables
%
arduino:avr:leonardo 28 0.1 0 0.0 28 0.1 0 0.0 28 0.1 0 0.0 28 0.1 0 0.0 28 0.1 0 0.0 28 0.1 0 0.0 28 0.1 0 0.0 28 0.1 0 0.0 28 0.1 0 0.0 28 0.1 0 0.0
arduino:avr:mega 28 0.01 0 0.0 28 0.01 0 0.0 28 0.01 0 0.0 28 0.01 0 0.0 28 0.01 0 0.0 28 0.01 0 0.0 28 0.01 0 0.0 28 0.01 0 0.0 28 0.01 0 0.0 28 0.01 0 0.0
arduino:avr:nano 28 0.09 0 0.0 28 0.09 0 0.0 28 0.09 0 0.0 28 0.09 0 0.0 28 0.09 0 0.0 28 0.09 0 0.0 28 0.09 0 0.0 28 0.09 0 0.0 28 0.09 0 0.0 28 0.09 0 0.0
arduino:mbed_nano:nano33ble 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0
arduino:mbed_nano:nanorp2040connect 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0
arduino:mbed_portenta:envie_m4 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0
arduino:mbed_portenta:envie_m7 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0
arduino:megaavr:nona4809 28 0.06 0 0.0 28 0.06 0 0.0 28 0.06 0 0.0 28 0.06 0 0.0 28 0.06 0 0.0 28 0.06 0 0.0 28 0.06 0 0.0 28 0.06 0 0.0 28 0.06 0 0.0 28 0.06 0 0.0
arduino:sam:arduino_due_x_dbg 0 0.0 N/A N/A 0 0.0 N/A N/A 0 0.0 N/A N/A 0 0.0 N/A N/A 0 0.0 N/A N/A 0 0.0 N/A N/A 0 0.0 N/A N/A 0 0.0 N/A N/A 0 0.0 N/A N/A 0 0.0 N/A N/A
arduino:samd:mkrzero 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0
Click for full report CSV
Board,examples/Autoscroll<br>flash,%,examples/Autoscroll<br>RAM for global variables,%,examples/Blink<br>flash,%,examples/Blink<br>RAM for global variables,%,examples/Cursor<br>flash,%,examples/Cursor<br>RAM for global variables,%,examples/CustomCharacter<br>flash,%,examples/CustomCharacter<br>RAM for global variables,%,examples/Display<br>flash,%,examples/Display<br>RAM for global variables,%,examples/HelloWorld<br>flash,%,examples/HelloWorld<br>RAM for global variables,%,examples/Scroll<br>flash,%,examples/Scroll<br>RAM for global variables,%,examples/SerialDisplay<br>flash,%,examples/SerialDisplay<br>RAM for global variables,%,examples/TextDirection<br>flash,%,examples/TextDirection<br>RAM for global variables,%,examples/setCursor<br>flash,%,examples/setCursor<br>RAM for global variables,%
arduino:avr:leonardo,28,0.1,0,0.0,28,0.1,0,0.0,28,0.1,0,0.0,28,0.1,0,0.0,28,0.1,0,0.0,28,0.1,0,0.0,28,0.1,0,0.0,28,0.1,0,0.0,28,0.1,0,0.0,28,0.1,0,0.0
arduino:avr:mega,28,0.01,0,0.0,28,0.01,0,0.0,28,0.01,0,0.0,28,0.01,0,0.0,28,0.01,0,0.0,28,0.01,0,0.0,28,0.01,0,0.0,28,0.01,0,0.0,28,0.01,0,0.0,28,0.01,0,0.0
arduino:avr:nano,28,0.09,0,0.0,28,0.09,0,0.0,28,0.09,0,0.0,28,0.09,0,0.0,28,0.09,0,0.0,28,0.09,0,0.0,28,0.09,0,0.0,28,0.09,0,0.0,28,0.09,0,0.0,28,0.09,0,0.0
arduino:mbed_nano:nano33ble,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0
arduino:mbed_nano:nanorp2040connect,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0
arduino:mbed_portenta:envie_m4,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0
arduino:mbed_portenta:envie_m7,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0
arduino:megaavr:nona4809,28,0.06,0,0.0,28,0.06,0,0.0,28,0.06,0,0.0,28,0.06,0,0.0,28,0.06,0,0.0,28,0.06,0,0.0,28,0.06,0,0.0,28,0.06,0,0.0,28,0.06,0,0.0,28,0.06,0,0.0
arduino:sam:arduino_due_x_dbg,0,0.0,N/A,N/A,0,0.0,N/A,N/A,0,0.0,N/A,N/A,0,0.0,N/A,N/A,0,0.0,N/A,N/A,0,0.0,N/A,N/A,0,0.0,N/A,N/A,0,0.0,N/A,N/A,0,0.0,N/A,N/A,0,0.0,N/A,N/A
arduino:samd:mkrzero,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0

@ajvdw ajvdw closed this Sep 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants