Download issues - was working fine then stopped?

kittygobeep

New Member
I didn't change anything at all that I'm aware of, and suddenly I was unable to download any programs onto my PICAXE-28X1, despite that I had been downloading programs without any problems for the past hour or so.

I tried going to Options > Serial Port > Test in PICAXE Programming editor and it definitely isn't connected; in fact, there is no potential difference at all between the Serial In pin and 0V, which isn't supposed to be the case!

Any suggestions on how I could get it to work, please? I've checked the Download Checklist in the manual, but it mostly seems not to be applicable because the downloading worked perfectly for a while, for me, before stopping.

Thanks a lot! :)

...Also, this is a bit of a side issue, but any help would be appreciated: I'm using an LCD in my circuit, and the characters become increasingly faint, as the circuit operates, until they're hardly visible. Then, if I take away the power supply, wait about a minute, and reconnect it, the display is clear again - but then the same thing happens again. I don't know much about LCDs - is there something obvious I'm missing? Thanks....
 

manuka

Senior Member
What actually IS your power supply? Many LCDs need a good 5½ Volt supply, & 3 x AAs will not be enough. Perhaps use 4 x fresh alkaline AAs with a Si diode dropper (~0.6V) in series. This supply issue may relate to your download woes too.
 

hippy

Technical Support
Staff member
Sounds like you have some sort of power supply problem there which could also be affecting downloads.

I'd suggest disconnecting the LCD, maybe even moving the PICAXE to a breadboard with just power and download interface to see if that works.
 

premelec

Senior Member
I'll concur on the weak battery hypothesis... also if good batteries don't cure the download problem sometimes you have a command like SLEEP operating which prevents downloads during it's time - cure is to start download attempt with power off and then turn it on as download starts... good luck...
 

Dippy

Moderator
Ah, can't be surely, I'm sure checking for flat/weak batteries or the power supply was the first thing that kitty checked.
 

kittygobeep

New Member
Thanks everyone -

After leaving it overnight without changing anything, I've found that it's miraculously started to download perfectly, again! :confused:

:)

But the LCD is still being problematic. The datasheet for the LCD says the operating voltage (at 25 degrees C) is 3V, and I'm using two AA's with it, which are currently giving around 2.7V. I've connected the two COM pins to ground, and connected the PICAXE's outputs directly to the pins controlling the segments.... Any insights, please? :(
 

moxhamj

New Member
Ah, yes batteries can recover a bit if you leave them overnight. 3V is too low and 2.7V from two batteries means they are almost flat. Use three new batteries and it should work a lot better!
 

kittygobeep

New Member
So it won't damage the LCD even if I use 4.5V when the datasheet says 3V?

(NB - The LCD circuit is basically separate from the download circuit)
 

kittygobeep

New Member
Here's the LCD datasheet...

I don't have a diagram for the circuit or anything, but currently I'm just experimenting and making different segments of the LCD come on in sequence, etc. As I said the PICAXE outputs are connected directly to the LCD pins...
 

Attachments

Dippy

Moderator
"So it won't damage the LCD even if I use 4.5V when the datasheet says 3V?"

- DO NOT power that LCD from 4.5V.


Post your schematic please.
You can't just drip-feed us with info and expect a full answer.

Why 2 x 0V pins? Dunno. Ask Microchip perhaps.
 

kittygobeep

New Member
Here's a circuit diagram.
My LCD is 3.5 digits, and the three 7-segment displays in the circuit diagram are meant to represent separate digits of the same LCD. The rightmost 7-segment display isn't connected to the PICAXE but directly to 3V because I want it always to show "7".

The segments that are on get increasingly faint as the circuit operates, until they're practically not visible, no matter what program I use. I've mostly tried simple things like:

Code:
Main:
high 0,1,2
pause 1000
low 0,1,2
pause 1000
goto Main
Eventually I'll want the PICAXE to control the number shown, depending on light levels (from an LDR) -- but that isn't the issue at the moment; for now I'd just like the LCD to display numbers without getting fainter.

Also, even if the PICAXE isn't doing anything, the "7" on the rightmost display will get increasingly faint, the longer the power supply is connected.
 

Attachments

moxhamj

New Member
Oh, *that* sort of LCD. Hmm, not sure this is going to work so well. Not even sure if you can drive those pins directly. Have you looked at LCD modules, eg the ones near the end of the picaxe manual 3 (available from the Help menu)
 

eclectic

Moderator
Last edited:

hippy

Technical Support
Staff member
As suggested, try new batteries or even better a properly regulated 3V supply. That should solve the download problem.

I'm surprised the LCD works at all but I know nothing about driving these types of LCD. The datasheet implies to me it wants a 30-300Hz signal rather than DC. It could be that the longer the LCD segments are on while subject to DC the more the liquid crystals degrade and thus fade away.

For 30Hz that's around 15ms on and off so you could perhaps set the outputs required for 15ms then turn them off for 15ms.

You could drive the anodes with 'always on' pins as you are doing and have modulated operation by connecting all the LCD cathodes to a PICAXE PWM pin with PWMOUT controlling that, however that would result in AC across LCD segments and I don't know what sort of affect that will have. It could destroy the LCD so blocking diodes would need to be added to every anode drive line, or maybe it's meant to be AC controlled. You'd need to play with the PWM pre-scaler by poking SFR's to get down to the 30-300Hz rage required.

Have you had experience of driving this type of LCD before or are you just assumming it will work ? Have you searched Google and researched how to control direct drive LCD's ? This is the first link I found on Google ...

http://www.hanssummers.com/radio/lcdfreq/index.htm

Note that the two COM pins on the LCD connect to what's marked as a 50Hz signal and that also connects to PH of the actual LCD drives. Which then leads us to figure 8 ( page 7 ) of the 4543 data sheet ...

www.standardics.nxp.com/products/hef/datasheet/hef4543b.pdf

A bit more digging turns up this which shows exactly what the signals should be. Figure 2 on page 3 is hardly crystal clear but the description on page 2 says it all ...

"Applying a voltage between the common terminal and a segment terminal energizes the segment. Additionally the segment voltage has to be alternated. DC (direct current) will cause electrophoresis effects in the liquid crystal and will degrade the display. Consequently the voltages on both the common terminal and the segment terminals must alter"

www.atmel.com/dyn/resources/prod_documents/doc2569.pdf

That would seem to preclude the PWMOUT idea earlier as it seems the COM drive has to be a square wave and then segments are turned on or off depending whether their drive is inverse of that signal or the same as that signal. The 'bit-banged' idea of on then off for 15ms wouldn't work as suggested but could be made to work.

So, in just a few minutes from knowing nothing I have a pretty good idea of how to drive this type of LCD in theory if not in practice. I suggest you do a little moe research and do some further experimenting. Also be prepared to accept damage caused to the LCD during that experimentation.
 

Dippy

Moderator
And if that's not enough to put kitty off then I don't know what is.. at least I managed it in 5 lines.

Don't genuflect too much, you'll go blind :)
 
Last edited:

kittygobeep

New Member
Wow, thanks for all the information!
I didn't know LCDs were so complicated; I'll experiment with it, as hippy suggested.

Thanks again - the info is really useful, especially hippy's pdf! :)
 

inglewoodpete

Senior Member
Most of us use LCD alphanumeric displays (Eg 2 rows of 16 characters). The have self contained driver logic and memory. Usually, they are much easier to set up and, considering PCB design and additional components, ultimately cheaper.
 

Ralpht

New Member
Hi Kitty,

The type of display you have is an "LCD on Glass" type of display.
They are a raw LCD without the driver chips that normally make LCD's so easy to use.

I use similar ones to replace 7-segment LED's and they are actually very easy to drive. You must remember that they require an out of phase signal on the backplane (B.P.). Some people refer to this as and AC signal but that is not technically correct.

The way to do that is very simple but uses more chips than your standard LED display.

First you need a clock source that generates between 30 - 300 Hz, a LM555 chip will do running in astable mode.

The 555's output goes to all the backplane pins your LCD may have. As well, the same signal from the 555 goes to one input of a 74LS86 x-or gate. The other input of the x-or gate goes to whatever you normally use to drive a display - a Picaxe in youre case.

The output of the x-or gate goes to the appropriate segment of the LCD. You will have one gate per segment on your LCD, (segments a thru to g) so for the example of a 7-segment LCD, you will have 7 x-or gates.

That means that for one 7-segment display you will need 2 74LS86 chips. Plus the 555 clock chip but this can drive many displays.

The down side to using glass LCD's is the number of chips to drive them, the up side is the very low current draw.

If you need a quick drawing I can do one in eagle for you - just ask.

Sorry to say but the fading display usually means that driving the LCD from DC may have killed it :( but you might be lucky.

Good luck

Ralph
 

hippy

Technical Support
Staff member
You must remember that they require an out of phase signal on the backplane (B.P.). Some people refer to this as and AC signal but that is not technically correct.
It's not necessarily alternating voltage ( depends on ones reference "0V" ), but I would say it was alternating current. But I know what you mean as AC leads most people to think of alternating voltage ( even me ).
 

Dippy

Moderator
Yes, I guess the term AC could be a little not-quite-specific enough and maybe a little ambiguous.

But, of course, if anyone had read the links that hippy and I had spent time finding and posting then maybe the light would have come on?? (I have reached SPM .. Super Pompous Mode)
 

kittygobeep

New Member
Thanks a lot, Ralph!! Your info was really helpful.

I was thinking logic gates might do the trick; happy to be able to invest in them knowing it will work, now! :)

Luckily the display seems still to work -- I'll take care not to subject it to any more fading before getting the XOR gates.

Thanks everyone!
 

Ralpht

New Member
Glad to help Kittygobeep,

You can also use a Pixace 08 to generate the 30+Hz clock, it will save on a bunch of resistors and caps. Or if you want to go really fancy, if the Picaxe you use can do it, you can use a spare output pin to suppy the clock.

You'll have to be a bit careful of timing and ensure that the clock output does not stop because of a reset, sleep - or whatever.

Good to hear your LCD is still alive. They tend to die pretty quick with Dc on them, so it looks like you were lucky.

Dippy/Hippy,

AC also brings to mind a sine wave. LCD's are not to happy with the 'slow' rise and fall time of a sine wave and prefer a nice clean square wave exactly out of phase with the segment.
But yeah, I guess you have to specify exactly what is meant by AC.
I generally think of it as a sine wave that herts 50 times a second when I screw up :)
 
Top