It is currently Thu Jan 18, 2018 7:38 am

All times are UTC - 8 hours

 Page 1 of 1 [ 4 posts ] 
Author Message
 Post subject: Ampere-Hour Meter - reply
PostPosted: Sat Jul 27, 2013 7:33 pm 

Joined: Fri Jul 04, 2008 9:56 pm
Posts: 4
Location: Cape Cod, MA, USA
In response to the Ampere-Hour Meter answer in the August 2013 issue:
I notice that variable HOUR, in routine TEST, is not being accumulated. I believe it should be, HOUR = HOUR + ((1/3600)*5)
The parentheses are for clarity. As published, the value of HOUR will never increase.

 Profile Send private message  
 Post subject: Re: Ampere-Hour Meter - reply
PostPosted: Wed Jul 31, 2013 1:07 pm 

Joined: Wed Jul 31, 2013 12:56 pm
Posts: 1
Just one observation: generally the R/W pin is an input to the display R-read, W-write. the logic is usually high for read and low for write. Most designs usually tie r/w low and insert a fixed delay between write instructions. if you want a more dynamic driver then you would read the lcd status register continuously after every write instruction to see when the busy flag clears.

Your driver is too basic, and the connections R/W, RS and EN are all LCD control lines driven by the PIC; you really need to read about the LCD controller!

'' - General write-up for the LCD controller
'' - Hitachi Data sheet for the LCD controller

Unless you plan to use the spare I/O on the PIC, why not use the LCD in 8-bit mode rather than 4-bit it makes the software driver a little less complex.

'' - a c demo written for the AVR, but hd44780.c/h will give you the idea
'' - an open source PIC LCD driver
'' - another LCD driver example

Not sure about the analogue, a little outside my expertise but I'm interested in trying it as it would make an excellent workbench tool for me.

 Profile Send private message  
 Post subject: Re: Ampere-Hour Meter - reply
PostPosted: Mon Aug 05, 2013 8:33 am 

Joined: Thu Jan 17, 2002 1:01 am
Posts: 9
Location: FL
for anyone that is interested there is an article posted in the ARRL QST Ham radio mag.
in the May 2010 page 44 & 45 on this subject it looks much simpler than the one posted here
so if you are a ham or can get a copy of the article from QST.
The software program is listed on the ARRL website.
I don't know the legal end of copying and posting the article so i'm staying away from that
I have not seen a reply of a problem listed with this unit .

 Profile Send private message  
 Post subject: Re: Ampere-Hour Meter - reply
PostPosted: Mon Aug 05, 2013 9:47 pm 

Joined: Wed Jan 12, 2005 1:01 am
Posts: 1
Location: Sunnyvale, CA
Your circuit looks OK, so it's probably how the software runs the interface pins for the sequence and timing of signals for reads and writes. The 44780 protocol also has an interesting initialization process. I found the data sheet for the MIKROE-55 (Winstar 16 characters x 2 Lines LCD Display) at: ... 6_spec.pdf
(Some of the important relationships)
Section 7. Interface Pin Function lists descriptions.
NOTE: Pin 4 = Register Select RS H/L H: DATA, L: Instruction code
Pin 5 = Read/Write Select R/W H/L H: Read(MPU<--Module) L: Write(MPU-->Module)
Pin 6 = Chip Select E H,H-->L Chip enable signal
Pin 11 = DB4 H/L Data bus line
Pin 12 = DB5 H/L Data bus line
Pin 13 = DB6 H/L Data bus line
Pin 14 = DB7 H/L Data bus line
NOTE: Busy Flag (BF) is read from Pin 14(DB7). (See Sections 9, 11 & 12)
When the busy flag is 1, the controller LSI is in the internal operation mode,
and the next instruction will not be accepted. When RS=0 and R/W=1, the busy
flag is output to DB7. The next instruction must be written after ensuring
that the busy flag is 0.

Section 13. Initializing of LCM is detailed. (Using 4-Bit Interface)

Additional information at: ... controller

Keep working at it, it will be worth it to your project.

Best Regards, Eric

 Profile Send private message  
Display posts from previous:  Sort by  
 Page 1 of 1 [ 4 posts ] 

All times are UTC - 8 hours

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: