Our new official repo is on github
LCD Smartie version 5.6 is released!
Download it now: https://github.com/LCD-Smartie/LCDSmartie/releases

Display real-time clock when PC is off or in standby?

General discussion about LCD Smartie.

Moderators: _X7JAY7X_, caesar, IFR, mattcro, limbo, Fast351

Post Reply
barnabas1969
Posts: 14
Joined: July 31st, 2011, 3:07 am

Display real-time clock when PC is off or in standby?

Post by barnabas1969 »

Hello.

I'm considering building a real time clock circuit and then hooking it up to my 20x2 display so that the display will show the time of day even when the computer is turned off or in standby. My idea is to use the 5VDC power from the PC to switch the data input on the display between the RTC circuit and the output of the FTDI chip so that the display will show the output of LCD Smartie when the PC is running, and will display the time of day when the PC is not running.

I've never messed with PIC processors, but I'm guessing that's the route I will need to take in order to make a RTC circuit output the time in a way that is compatible with a HD44780 display... so if I go that route, I'll need to buy a programmer and learn how to work with PIC processors (which sounds interesting to me, but adds the expense of buying the programmer and the time to learn PIC programming).

If someone here has already done something like this and is willing to share ideas, schematics, etc. I would really appreciate your input... especially if it saves me time and money.

Thanks in advance.
mattcro
Forum Supporter
Posts: 590
Joined: March 8th, 2006, 1:58 pm
Location: Scotland

Re: Display real-time clock when PC is off or in standby?

Post by mattcro »

Sounds like and interesting project. Is this a serial connected LCD? Is the FTDI chip you mentioned a USB-RS232 converter?

If you are taking the 5V from a USB port, you need to check if the 5V switches off when the PC is switched off. Many USB ports and hubs still supply power in standby/hibernate mode.

You also need a way to switch/multiplex the input to the LCD. This is reasonably easy if it's a logic-level serial input. And of course, you need some way to set the time on the RTC - buttons, special serial commands...

You can use a PIC processor or an AVR (Atmel). I used to use PICs and the HiTech C compiler (there's a free version that supports a few common PICs), but now I use AVRs (similar to PICs in terms of features) and the Bascom Basic compiler. Bascom takes care of a lot of the nitty-gritty of using an AVR and some peripherals like RTCs and LCDs so it can be an easy(ish) way to get started. There's a free demo version that lets you compile small projects. I don't know much about what's available nowadays for PIC development.
barnabas1969
Posts: 14
Joined: July 31st, 2011, 3:07 am

Re: Display real-time clock when PC is off or in standby?

Post by barnabas1969 »

I was thinking of using some simple logic gates to control which data source would control the display. The FTDI chip is a USB converter, but it does not appear to convert to RS-232... it actually has 8 data lines going out of the FTDI chip and into the display. You can see more info about the FTDI chip at the link below. I don't know if mine is using 4 data lines or 8... I haven't gotten that far into testing it.
http://forums.lcdsmartie.org/viewtopic.php?f=11&t=1540

The 5V supply from my USB port stays on when the PC goes to sleep. That's why I need to use a separate 5V signal that turns off when the PC goes to sleep so that I can change the logic gates to allow data to pass from the clock circuit when the PC is in standby. I can either use the 5V supply from the PSU, or I can use a separate power supply that is switched off by my smart power strip (more info on the smart power strip here: http://www.cyberguys.com/product-detail ... ctid=27258).

I did some quick searching around, and found that the programmers for the PIC processors are more than $100.00 USD. I don't think I'm willing to spend that much money on this. I've never heard of the AVR processors. Can I get a programmer cheaper than $100? I would even be willing to pay someone to program a microprocessor for me, if it's cheaper than buying all the stuff myself. I realize that learning to program these things could come in handy in the future though.

I would definitely be interested in a BASIC compiler as that's where I have the most experience. I've toyed around with C a little, but I feel much more comfortable with BASIC.
mattcro
Forum Supporter
Posts: 590
Joined: March 8th, 2006, 1:58 pm
Location: Scotland

Re: Display real-time clock when PC is off or in standby?

Post by mattcro »

You should be able to get both PIC and AVR programmers for much less than $100. You can even build a very simple programmer yourself that uses a parallel or serial (COM) port directly with just a handful of components and free software. For PIC micros I built a David Tait parallel port interface and used it with ICProg and WinPIC. I think there are also some small development boards that can act as a simple programmer.

You can find out more about BascomAVR at http://www.mcselec.com/ and try the free demo. There is a very active forum on that site too, plus app notes and code samples. They even sell several AVR programmers including a USB one for 39 Euros. There are lots of other sellers too.

It's probably a similar story for the PIC micros. There are loads of forums and info sites, and several compilers including Basic, Pascal and C - check out MikroElektronika at http://www.mikroe.com (the compilers are a bit steep for occasional hobby use).

I didn't realise that you used the FT245 interface, I just assumed you had a USB-serial setup. You will need to multiplex the 4 data lines, plus the E, R/W and A0 control lines. I think you can just use 7 or 8 channels of 2-to-1 multiplexer, and I think there are several CMOS or TTL logic chips that can do this.
barnabas1969
Posts: 14
Joined: July 31st, 2011, 3:07 am

Re: Display real-time clock when PC is off or in standby?

Post by barnabas1969 »

Thanks again for the info. I read somewhere that it is "not advisable" to use simple or home-made programmers, but I don't understand why not. It seems that it would be pretty easy to program or re-program one of these processors with a PC parallel port. I'll check out the sites that you linked.

Right now, I have another issue. I moved my display and copied the smartie directory from my desktop PC to my HTPC. I installed the same drivers. Both PC's are running Windows 7 x64. The display works fine on my desktop PC, but it won't display custom characters correctly on the HTPC. It displays plain text fine on the HTPC. This only affects custom characters like those that come from the bignum plugin. There is another person on this site who has posted a similar issue (link here:http://forums.lcdsmartie.org/viewtopic.php?f=4&t=3215). He said that he got it to work by installing a PCI-USB controller card. I have an extra one, so I'm going to try that. I couldn't try it last night because others were watching TV until it was too late in the evening for me to take the cover off the PC.
Mandazen

Re: Display real-time clock when PC is off or in standby?

Post by Mandazen »

Hello,

I am new using LCD Smartie, and I am starting reading here because I would like to use it without conecting to PC to see some messages and to see the time. So I undesrtand reading here that...

The LCD Smartie has not an internal clock, is it true?? Do I need a PIC or some similar micro external for that?? I would like if you could help me with that. Thank you very much.
limbo
Plugin Author
Posts: 1604
Joined: February 13th, 2005, 7:38 pm
Location: Athens - Greece
Contact:

Re: Display real-time clock when PC is off or in standby?

Post by limbo »

Go to arduino... :)
Post Reply