|
wrote code, ran into 1000 item limit. put i+=1 and if else and broke into multiple uploads.
I know there is probably a cleaner way to do it. But it is Friday afternoon and Well I wanna get this done and go home.
I don't blame myself but I know in 6 months when I look at the code I will wonder what I was thinking.
To err is human to really mess up you need a computer
|
|
|
|
|
If you use visual studio put // TODO: Fix this and make it work better or similar and then you can look at all your TODOs by going View|Task List in VS2019 (should work with older versions too)
Real programmers use butterflies
|
|
|
|
|
honey the codewitch wrote: you can look at all your TODOs by going View|Task List in VS2019 Yes, you can. And you might even create tech debt items to track them in your favorite issue/project tracking system. And monitor their presence/growth over time in a nice dashboard. But it's unlikely you'll ever fix them.
The only way to go fast is to go well.[^]
/ravi
|
|
|
|
|
That's fair enough. I don't disagree. The problem is that I've had managers who do. Make the best of what you have to work with.
Real programmers use butterflies
|
|
|
|
|
cheers
Chris Maunder
|
|
|
|
|
Expect the Spanish inquisition. Anytime now!
|
|
|
|
|
|
Make sure to comment it.
That should tell everyone what they need to know about the code that follows
|
|
|
|
|
Does anyone know what the simplest circuit to use for a 16 pin LCD hitachi style display is to make it display *anything* or even turn on the backlight?
I got a new kit and I can't seem to get the LCD display to respond at all, and I'm not finding the answer to this anywhere. All the examples I can find use a library, and require the thing to be fully wired up. The problem is, after having done that, even after double checking and triple checking my wiring against the examples it still didn't work. I need something simpler just to do a basic power-on sanity check for the LCD.
I have no idea what the hitachi display protocol looks like in practice and the pins aren't very descriptive.
I know there are some arduino-heads here on CP. Can I get that LCD to do anything at all with two or three connections?
Real programmers use butterflies
|
|
|
|
|
Is it a 5 volt display or does it use some other voltage?
Are you sure you have the power connected to the correct pins?
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
It's 5vdc from the looks of it. I would think I'm certain having checked multiple times, but the display disagrees with me, since it just sits there dead as a fish when it's supposed to be printing "Hello World"
I need to order a multimeter from amazon. I suppose I'll do that today.
Real programmers use butterflies
|
|
|
|
|
Are you giving the display time to boot before sending the display string?
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
the sample program has a delay in it - presumably for that. What's curious to me is the backlight isn't even coming on.
Real programmers use butterflies
|
|
|
|
|
Some displays require you to send a command to turn on the backlight.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
I'm almost certain this one is voltage controlled based on the schematic I'm working with - it's got a potentiometer wired between one of the pins and the power source.
Real programmers use butterflies
|
|
|
|
|
You should check whether the display takes inverted serial input instead of normal.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
That's interesting. I wouldn't know since this kit has zero instructions. It's a clone of the Arduino Mega 2560 and presumably all of the gear in the kit (like the display) is supposed to work out of the box just like the arduino stuff. If not, then I may as well throw it away since there are no instructions.
That said, the pinouts for this LCD and the one in the Arduino provided sample are all labeled the same except 2 pins have a different name on the schematic - "A" vs "LED+" and "K" vs "LED-" but i think they are the same thing, given the other 14 pins are identical, and those are for the backlight according to the schematic
Real programmers use butterflies
|
|
|
|
|
K=kathode/-, A=anode/+; so indeed a generalisation of LED-/LED+.
|
|
|
|
|
Assuming the connections are proper, the backlite should work if power is present. Are the character segments doing anything (I'm guessing it's a 16x2 or similar)? It's been my experience that the segments 'get slightly darker' when power is applied, regardless of backlite. Also, there's the contrast voltage to consider.
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
|
|
|
|
|
jeron1 wrote: It's been my experience that the segments 'get slightly darker' when power is applied, regardless of backlite
Thank you! That's helpful.
It's not doing anything - it's as dead as fish, meaning I've either wired it catastrophically wrong or it came dead on arrival. I've checked the wiring many times, so at this point I'm kind of at a loss.
It's why I wanted to know if anyone knew how to simply get power to thing just so I can prod it for signs of life.
Real programmers use butterflies
|
|
|
|
|
Does turning the pot from one extreme to the other do anything noticeable?
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
modified 2-Oct-20 13:33pm.
|
|
|
|
|
Nope. I even tried wiring/shorting around the pot but nothing.
Real programmers use butterflies
|
|
|
|
|
The pot is for contrast so you generally can't go around it (unless you're using fixed resistors). The fact that the backlite does nothing, is suspicious like there's no voltage. Without a multimeter it's difficult say, you wouldn't happen to have a discrete LED and a 1K resistor, that you could use as a kind of 'voltage' probe?
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
|
|
|
|
|
Yeah but I'm not sure which pins i need to check. I think i know which are the data pins, but the control pins labels aren't very clear. It's why I was hoping someone could tell me at minimum, which of the 16 pins on this apparently standard LCD interface I need to wire up to show signs of life.
Real programmers use butterflies
|
|
|
|
|
I would check pins 1 and 2, generally pin 1 is ground and pin 2 is 5v, if you don't have this nothing else matters. Similarly, pin 16 is ground for that backlite and pin 15 is the current limited 5v input for the backlite.
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
|
|
|
|