Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 10:50 11 Nov 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : 1 wire LCD

Author Message
vasi

Guru

Joined: 23/03/2007
Location: Romania
Posts: 1697
Posted: 10:48pm 22 May 2014
Copy link to clipboard 
Print this post

As I was porting (from C AVR) a better one_wire library than Jallib actually has (the current one offers basic functionality, unable to sense all the changes on the bus) and, because I recently tested an 2x16 LCD in 4bit mode, I thought that maybe there is one_wire LCD library somewhere on the net. It is fantastic what I found if it will work:

@McLaren (Mike) from DangerousPrototypes.com came with one 8pin microcontroller as one wire driver for an LCD. In fact, it had nothing to do with the one_wire protocol, it was just "physically identical".



On the forum's thread you can download the sources. I know that there are also solutions based on shift registers but this one is very nice.
Hobbit name: Togo Toadfoot of Frogmorton
Elvish name: Mablung Miriel
Beyound Arduino Lang
 
viscomjim
Guru

Joined: 08/01/2014
Location: United States
Posts: 925
Posted: 02:25am 23 May 2014
Copy link to clipboard 
Print this post

Vasi,

Just checked that one out. VERY COOL! I might give that a whirl just for fun. From a quick read, it seems that it uses a serial port? Will have to dig deeper.

Thanks!
 
vasi

Guru

Joined: 23/03/2007
Location: Romania
Posts: 1697
Posted: 02:31am 23 May 2014
Copy link to clipboard 
Print this post

The TX pin from your microcontroller must be hook up to the GP3 pin of PIC12F635 and the comm. speed seems to be 57600 bps! Yes, serial, but still one pin .
Hobbit name: Togo Toadfoot of Frogmorton
Elvish name: Mablung Miriel
Beyound Arduino Lang
 
Goeytex
Regular Member

Joined: 12/05/2014
Location: United States
Posts: 74
Posted: 02:55am 23 May 2014
Copy link to clipboard 
Print this post

  vasi said   The TX pin from your microcontroller must be hook up to the GP3 pin of PIC12F635 and the comm. speed seems to be 57600 bps! Yes, serial, but still one pin .


Looks like a better option than the cheap I2C Backpacks via Ebay. I can live with 57600 bps.

The Diagram shows a PIC12F635, however the code supplied on the link is for PIC12F683. But probably not too hard to port to PIC12F635.

I happen to have several spare PIC12F683s (Picaxe 08M), so I will "re-purpose" one of these and see how it works out.

Bill

 
vasi

Guru

Joined: 23/03/2007
Location: Romania
Posts: 1697
Posted: 03:38am 23 May 2014
Copy link to clipboard 
Print this post

I looked at datasheet and both have a maximum of 8MHz internal oscillator so, there will be no problems regarding the comm.speed and other timings. 12F683 is better than so it should work from the first try.Edited by vasi 2014-05-24
Hobbit name: Togo Toadfoot of Frogmorton
Elvish name: Mablung Miriel
Beyound Arduino Lang
 
Goeytex
Regular Member

Joined: 12/05/2014
Location: United States
Posts: 74
Posted: 06:56am 23 May 2014
Copy link to clipboard 
Print this post


Qualified success.

Upon initialization the display showed several characters of garbage. But accepts characters. It displays "Hello" after the garbage. It will not accept command data.

The scope showed RS not staying high long enough. So the CAP was changed to 1nf and it seems to work OK now.

By looking at the scope, it seems that the cap is being charged by two 5us pulses. With a 330p Cap there is a dip to zero in the middle of the signal on RS.

Increasing the cap to 1nF reduces the dip to an acceptable level. Now there is no garbage, & I can send 0xFE, 0x01 to clear the screen.

This is a Newhaven display with a ST7066U Controller.

Could it be that the loading on the RS pin varies between driver chips?

Looks very good, but needs some further testing before I'd say all is well.

Bill



 
vasi

Guru

Joined: 23/03/2007
Location: Romania
Posts: 1697
Posted: 10:00am 23 May 2014
Copy link to clipboard 
Print this post

Hi Bill,

Thank you for your qualified testings. Yes, I have three 2x16 LCDs which required different timings for initialization.
Exactly your controller!!!. So for me is great to know this (I will include the both capacitors and select them with a jumper).

BTW, using ATmegas with a general LCD library it worked from the first try (it seems that they included all the necessary timings for all the LCD controllers).

Thanks!

datasheet Edited by vasi 2014-05-24
Hobbit name: Togo Toadfoot of Frogmorton
Elvish name: Mablung Miriel
Beyound Arduino Lang
 
Goeytex
Regular Member

Joined: 12/05/2014
Location: United States
Posts: 74
Posted: 12:36pm 23 May 2014
Copy link to clipboard 
Print this post



Hi Vasi,

So far so good. The little serial back pack is working great with a Picaxe 20X2 using Hardware serial (HSEROUT) at 57600 bps.

This should work on any Picaxe that supports "HSEROUT".

With a Picaxe using software "serout", the source code will need to be changed for 19200 bps and the Picaxe must set to operate at either 16 or 32 Mhz.

This frees up 5 pins (vs 4-bit parallel) and even allows the 08M2 to control an LCD at relatively high speeds using only 1 pin.

Should work fine on all other platforms as well.

I may try to port the source code to a 14-Pin PIC to allow jumper selection of the baud rate and command control of the back light. But that's another day.

Thanks for posting the link and bringing this to our attention.

Bill
 
jman

Guru

Joined: 12/06/2011
Location: New Zealand
Posts: 711
Posted: 02:13pm 23 May 2014
Copy link to clipboard 
Print this post

Hi

SparkFun have a great serial one wire LCD backpack
SparkFun Serial LCD

It is based on a PIC 16F88 (I used a DIP version)
Backlight is controlled via software (Nice)

I have hand built a few of these and they work great with the Mite family
It will run on 3.3v and 5V

Source code is available and a precompiled hex
There are two versions one for 2 Line LCD's and one for 4 Line LCD's

I have attached the relevant files including the user manual


2014-05-24_000704_serlcd-v2_7_4line_10MHz.zip
2014-05-24_000716_serlcd-v2_7_2line_10MHz.zip
2014-05-24_000748_LCD_BackPack.zip

Regards
Jman
 
MicroBlocks

Guru

Joined: 12/05/2012
Location: Thailand
Posts: 2209
Posted: 10:32pm 23 May 2014
Copy link to clipboard 
Print this post

@Goeytex,
Don't forget about MOBI's I2C version that works on a small pic.
No need to reinvent it again. And it includes a PWM controlled backlight. :)


Microblocks. Build with logic.
 
Goeytex
Regular Member

Joined: 12/05/2014
Location: United States
Posts: 74
Posted: 03:04am 24 May 2014
Copy link to clipboard 
Print this post

Lots of choices for those with the capability to flash a PIC. Even more if you can write / modify Assembly or C.

The Spark Fun serial Backpack looks good, but $16.95 seems quite pricy for a serial backpack when the LDC module itself only costs from $2 to $12 depending upon the source. I don't particularly like that the micro uses a crystal or that the code was written in CC5X.

Shift register based I2C backpacks/LCDs are cheap but generally have poor performance and tend to be buggy ( Especially the $2 - 3$ ones that are Asian sourced)

I once did a backpack based upon the Picaxe AXE133 FIRMWARE. It uses a Picaxe 18M2. Works good, but can barely get out of it's own way with a fixed baud rate of 2400. The firmware is interpreted Picaxe BASIC, but could likely be ported to another Basic & compiled which would allow it to operate to operate at much higher speeds. The code is actually very tight, it's just that using software serial and being interpreted limits performance.
 
vasi

Guru

Joined: 23/03/2007
Location: Romania
Posts: 1697
Posted: 03:05am 24 May 2014
Copy link to clipboard 
Print this post

TZA, I have available a couple of dip 12F629, smd 12F675, one 12F683, a 16f628A and a 16F690. There is a dedicated chip, DS2408 for one_wire buses but for me, the 12F683 solution is better, cheaper and simpler to build (no one have some admiration for what someone was able to do with a little 8pin micro?). Probably will be the same for many.

We have in JALLIB repository a serial LCD based on 16F88: sources, schematic, pcb. And having the code, I can easily adapt it for 16F690 or any suitable micro anytime but it wasn't what I looked for. In JALv2 + Jallib is trivial to change the microcontroller of a project.Edited by vasi 2014-05-25
Hobbit name: Togo Toadfoot of Frogmorton
Elvish name: Mablung Miriel
Beyound Arduino Lang
 
McLaren
Newbie

Joined: 28/06/2011
Location: United States
Posts: 11
Posted: 04:36pm 15 Jun 2016
Copy link to clipboard 
Print this post

Hi guys. Just came across this thread and wanted to say thank you for trying out the little 8-pin Serial backpack.

Cheerful regards, Mike
Mike McLaren, K8LH
 
McLaren
Newbie

Joined: 28/06/2011
Location: United States
Posts: 11
Posted: 01:00pm 25 Apr 2018
Copy link to clipboard 
Print this post

I'd love to see pictures of how you guys implemented this little backpack design. I didn't do much with it except to put it on a little 8-14-20 pin development board (picture below).

Cheerful regards, Mike McLaren, K8LH (Michigan, USA)



Edited by McLaren 2018-04-26
Mike McLaren, K8LH
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025