|
Hi honey the LCDwitch
any progress?
I just happen to be working on a PIC+LCD project; my LCD is working, after some struggle, and here are my recent observations:
1. pin 3 is most relevant; a lot of documentation is misleading, this pin is not "LCD power" or some similar, suggesting 5V would be reasonable. It is a contrast control input, the official approach is using a little potmeter, say 10K, between GND and 5V, and turning it very close to ground, NOT close to 5V. A good alternative seems to be just a diode from pin 3 to GND; that is what I'm using now.
2. The LCD needs a few commands to become alive; one of them is the "function set" command, holding a "display ON" bit; so you need some correct toggling of E, RS, and 4 or 8 data lines.
3. The pulses required on E are a bit special: the leading edge must fall after RS and RW have settled, and the falling edge after the data is presented. This is unlike most other micro-electronic peripherals I have ever seen (normally one edge is used to sample everything, and the other edge doesn't care much).
4. The data bus is either 8 or 4 bits wide; in order to get it in 4-bit mode RELIABLY you need a specific sequence of commands. Without proper initialization the display remains blank, as if no power were applied. And the display may remain confused as long as it is getting power (or a really correct command sequence).What Hitachi HD44780 LCD controller - Wikipedia[^] says is correct and effective, it is better then what a lot of data sheets provide! Some manufacturers that used to provide bad info are now refraining from providing initialization info at all. The mistakes can be blatant or subtle, I also found a github code sample that was wrong... This is what I'm using right now (using a 4-bit interface):
CALL WAIT40msec ; important!
BCF LCD_RS_PP ; set RS low
MOVLW 0x03 ; 8-bit interface
CALL display_write_nibble
CALL WAIT1msec
MOVLW 0x03 ; 8-bit interface
CALL display_write_nibble
CALL WAIT1msec
MOVLW 0x03 ; 8-bit interface
CALL display_write_nibble
CALL WAIT1msec
MOVLW 0x02 ; 4-bit interface
CALL display_write_nibble
CALL WAIT60usec
MOVLW 0x28 ; 4-bit interface, single line, 5*8 font
CALL display_send_fast_command
MOVLW 0x08 ; display off
CALL display_send_fast_command
MOVLW 0x01 ; clear
CALL display_send_fast_command
CALL WAIT2msec
MOVLW 0x0C ; display on, no cursor, no blink
CALL display_send_fast_command
MOVLW 0x06 ; mode: increment, no shift
CALL display_send_fast_command
The display_write_nibble subroutine sets E high, outputs a nibble, and clears E, all without extra delays.
The display_send_fast_command subroutine calls display_write_nibble twice and then waits 60µsec.
I did not compare that to whatever is present in other libraries such as Arduino's. With all I saw on internet, I'm inclined to only trust my own code...
5. LCD commands take some time to execute; a TYPICAL time is listed in the datasheet.
I decided against reading the busy flag (which isn't working anyway during the fist half of the initialization), instead I simply provide ample time for each command to be executed. So my R/W line is at GND permanently; this also eliminates the chance that the driving code is stuck in a wait-for-display-ready loop, keeping the display in an uninitialized state.
So I used fixed timing. It is wise to provide at least double the datasheet values, because (1) the internal microcontroller might run at a different frequency, and (2) HD44780 clones may hold different firmware and hence different timing.
6. Final remark: backlight pins 15 and 16 may or may not be swapped, and may or may not have some resistance in them (some 12 ohm). It all depends on the specifics of the PCB. Anyhow, the backlight is not essential, the display can be seen to be functional without it.
Luc Pattyn [My Articles]
If you can't find it on YouTube try TikTok...
|
|
|
|
|
I've decided to move to displays that are SPI or I2C based. It's just too many wires and i don't like putting pots in my circuits, and all that. it's just a mess and I'd rather go with something cleaner. Thanks though. I do have that display still but it's collecting dust. =)
Real programmers use butterflies
|
|
|
|
|
Hi All,
I suppose Task Manager is not really one those things you see everyday, but in fiddling today I noticed that the icon bar version has changed from a dark grey to a white with a green/red dotty back ground just plain strange don't remember that change...
|
|
|
|
|
No "green or red" for me; just a gray monitor icon with a blue and white performance chart.
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it.
― Confucian Analects: Rules of Confucius about his food
|
|
|
|
|
Unchanged for me - still a grey monitor.
Win10 Version 2004 (OS Build 19041.508)
Have you got an odd bit of desktop behind it or something?
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Well, mine is 18363 all little behind yours, I haven't change the desktop for a while.
The monitor (bleedin' Flat Panel) is playing up with some resolutions...
|
|
|
|
|
I used to hate facial hair, until it grew on me.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
I used to grow a beard, but my wife never liked it. She finally managed to get my goatee.
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
Shave on you, Daniel!
"If we don't change direction, we'll end up where we're going"
|
|
|
|
|
funny thing. herself said she didn't like facial hair. I threatened to grow a beard if she cut her hair. after third kid pulling on her hair. She cut it. short. it wasn't the worst. But I still grew the beard. She likes the beard. so I still have beard/goatee depending. And herself has grown her hair back out. I think I won. But I am not sure. One can never be sure with ones spouse.
To err is human to really mess up you need a computer
|
|
|
|
|
Why did you strop shaving, or did you just refuzz to continue?
St Nic, patron saint of straight razors.
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
Hi all, how do I change my signature ?
"We can't stop here - this is bat country" - Hunter S Thompson - RIP
|
|
|
|
|
Click your name at the top, click My Settings in the left, choose the Forums and QA tab.
Social Media - A platform that makes it easier for the crazies to find each other.
Everyone is born right handed. Only the strongest overcome it.
Fight for left-handed rights and hand equality.
|
|
|
|
|
"I didn't mention the bats - he'd see them soon enough" - Hunter S Thompson - RIP
|
|
|
|
|
Go to your Settings. Select the Forums and QA tab and the signature is set there.
- I would love to change the world, but they won’t give me the source code.
|
|
|
|
|
"I didn't mention the bats - he'd see them soon enough" - Hunter S Thompson - RIP
|
|
|
|
|
Try it with your other hand.
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it.
― Confucian Analects: Rules of Confucius about his food
|
|
|
|
|
I have gotten it, my whole family got it, half the people at work got it, a 70 year old at work got it and was back to work in a week. It wasn't that bad. Does the US have a different version of Covid than Europe?
I know my anecdotal experiences don't prove anything on a grand scale nor am I trying to, but I do find it interesting that my experiences with Covid have been so much easier than others experiences.
Or, based on a thread yesterday about Subway, maybe it's because American's eat so much junk food our immune systems are stronger? Although I don't ever eat fast food.
Schools have been back in session for 2 months and nothing has happened. I know some denser populations had some problems when school opened back up.
Everyone in the world at some point will be exposed to this thing if they haven't already.
Maybe it's the people that got infected early on that are having the worst time? Maybe I had already been exposed and built a little immunity but then was exposed again and again and finally got it but it wasn't that bad?
Or maybe testing just doesn't work?
I find it interesting how varied the experiences with Covid are throughout the world. It's easy to understand those that have been impacted hard are fearful of it and those that haven't don't worry much about it.
Very interesting.
Social Media - A platform that makes it easier for the crazies to find each other.
Everyone is born right handed. Only the strongest overcome it.
Fight for left-handed rights and hand equality.
|
|
|
|
|
ZurdoDev wrote: testing The problem with the term "test" is that when it is used in the media there is no information provided relating to the specifics of the clinical test.
As an example - if we are talking about a PCR test, the number of cycles carried out will have a big effect in detection of the virus.
Are all laboratories using the same number of cycles?
Also is there an agreed upon primer sequence design that all PCR tests for sars-cov-2 use and agree upon?
I am going to guess that there is no one standard all testers adhere to with regards to primers or cycles - which would result in different test protocols between countries and possibly even within countries.
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
|
|
|
|
|
Quite probably. But do you think that accounts for the different experiences of those infected or are you maybe suggesting that we are getting more false positives in the US testing?
Social Media - A platform that makes it easier for the crazies to find each other.
Everyone is born right handed. Only the strongest overcome it.
Fight for left-handed rights and hand equality.
|
|
|
|
|
False positive is a whole polarised political debate in and of itself unfortunately.
I just have a bit of a bee in my bonnet over the media's use of the term test and the over-simplification of the idea that a clinical test produces a binary answer and that there is an agreed upon gold-standard for testing sars-cov-2.
But it just feels like the words "test, test, test" that were uttered by the head of the WHO, over-simplify what can be a rather complex and nuanced process, both with the actual protocol of the test and with the interpretation of the results.
I don't know why people have different experiences and it would be good to be able to have a lot of these sorts of questions answered, although I imagine the answers would probably be "it depends.." as are a lot of answers in the world of medicine.
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
|
|
|
|
|
Good points.
Social Media - A platform that makes it easier for the crazies to find each other.
Everyone is born right handed. Only the strongest overcome it.
Fight for left-handed rights and hand equality.
|
|
|
|
|
Testing, per say, doesn't directly help anything. However, let's presume that in a given local they use the same test (or mix of tests). What then?
Well - the rate of positives is an indication of how well the spread is being contained. Sure, eventually everyone will get it (or maybe a vaccine), but the point with testing is not direct prevention.
It's to determine how to set the parameters to avoid overloading the medical care system.
An antibody test that implies immunity would be useful in allowing those who are found to be immune (by whatever means) can modify their behavior to take advantage of their protected status - and hopefully not be jerks and become second-hand spreaders.
Eventually, I hypothesize, the population will be fully exposed and it will then be left as a childhood disease - the only non-immune part of the population at that time - and small children, although virulent spreaders, rarely suffer from the disease.
Until then, however, I err on the side of living cautiously whilst awaiting a real breaktrhough.
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
The difficulty with interpreting the PCR test is that it doesn't tell you if a person has the active virus within them.
The PCR test does not test for the presence of the virus but rather what it tells you is that an RNA sequence which matches the sequence the primers are designed for exists within the person tested.
In other words, one could have had the virus a year ago and have fragments of the virus still within oneself and the PCR test could still amplify those fragments to return a positive test.
From what I understand the CFR if fairly low for covid-19, but it varies so widely from 0.06% in Singapore to 18.94% in France that I really do wonder if different countries are measuring the same things Global Covid-19 Case Fatality Rates - CEBM[^]
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
|
|
|
|
|
GuyThiebaut wrote: The problem with the term "test" is that when it is used in the media there is no information provided relating to the specifics of the clinical test.
In the same vein: At first nobody was getting tested...the published figures were for hospitalization cases. Nowadays if anyone's infected - whether they even feel any symptom or not - they're counted.
What also skews the numbers is that not every clinic in every region tracks individuals, and then share that information with each other. If you get tested multiple times at multiple locations, and you're testing positive, you're counted as that many cases.
|
|
|
|