Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 20:26 02 May 2024 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 : Server Room Temperature Logger

     Page 2 of 2    
Author Message
jman

Guru

Joined: 12/06/2011
Location: New Zealand
Posts: 711
Posted: 11:42pm 18 Nov 2014
Copy link to clipboard 
Print this post

  viscomjim said   Hi Jman, thanks for that. Could you clarify the values of the resistors you used in the contrast (16f88) divider circuit? To small for these eyes.


Sure
1K5 to the pic and 470R to Gnd

Jman
 
viscomjim
Guru

Joined: 08/01/2014
Location: United States
Posts: 925
Posted: 11:54pm 18 Nov 2014
Copy link to clipboard 
Print this post

Thanks!!
 
paceman
Guru

Joined: 07/10/2011
Location: Australia
Posts: 1328
Posted: 01:03am 19 Nov 2014
Copy link to clipboard 
Print this post

  jman said   Well spotted
This way I can run the LCD from 3.3v and still get good contrast
take a look at this 3.3v ContrastLet me know how you get on
Jman

Hi Jman,
That's pretty neat. I completely missed that thread back in Feb (fishing in Tasmania) so I did the standard pot for contrast control, 20K in this case across 5v (had 5v available anyway) on my UV exposure timer project. I'll definitely keep it in mind for future.

  viscomjim said   @Grogster, you mentioned the pwm for controlling brightness in the linked thread. Do you have a description of the circuit and the code you used for this?

Jim, I'm using a 20K pot connected across 5v/Gnd and wiper to the LCD's contrast control (i.e. V0, pin 3) - works well. I used 20K because using the 5v, the correct contrast was right up towards the top of the 10K pot that I tried originally.

I've got the backlight control from the PWM pin via 1K to the base of a BC337 NPN transistor (what I had available) with the collector going to the LCD backlight cathode (LCD pin 16) and emitter to Gnd via a 0.5K pot. The latter is to set the backlight brightness current for each PWM "ON" pulse. I set it such that it's about the right brightness at 60% duty cycle. The code I use for control is:

sub brightness
lcd 2,c20,""
if keycode = 11 then dutycycle = dutycycle + 10
if keycode = 10 then dutycycle = dutycycle - 10
if dutycycle < 0 then dutycycle = 0
if dutycycle > 100 then
dutycycle = 100
lcd 2,1, " MAXIMUM BRIGHTNESS "
endif
pwm 2,50,dutycycle
keycode = 99
end sub

The default duty cycle is set earlier (60% in my case) and I'm using the "*" and "#" keys of a 4x4 keypad to adjust it. The "*" (keypad code 11)and "#" (keypad code 10) increase or decrease the duty cycle 10% each time.

Greg

 
viscomjim
Guru

Joined: 08/01/2014
Location: United States
Posts: 925
Posted: 02:46am 19 Nov 2014
Copy link to clipboard 
Print this post

This is all very cool. No more pot for me... what?
 
     Page 2 of 2    
Print this page


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

© JAQ Software 2024