Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Thread

Re: [AVR-Chat] LCD backlight

Re: [AVR-Chat] LCD backlight

2004-04-11 by jay marante

The problem is i dont have the datasheet. I just
bought it from a local store. It doesnt have a name. I
already made it work. I just dont know how to connect
the backlight. Thanks for the help. -jay
--- samperi@ampertronics.com.au
<samperi@ampertronics.com.au> wrote:
> At 08:01 PM 10/04/04 -0700, you wrote:
> > Resistor (470 ohm)
> 
> This is probably too high. Check the data sheet it
should show
> the value for the series backlighting resistor and
it may be
> as low as 15 (one five) Ohms. Also you may get a
better result
> by using a small fet (2N7000??) for the switch
instead of a transistor.
> The VCC or anode is usually shown as "A" and the
cathode or
> Gnd is marked as "K"
> 
> Regards
> 
> John Samperi
> 
>
******************************************************
>                         Ampertronics Pty. Ltd.
>   11 Brokenwood Place Baulkham Hills, NSW 2153
AUSTRALIA
>          Tel. (02) 9674-6495       Fax (02)
9674-8745
>                Email: samperi@ampertronics.com.au
>                  Website 
http://www.ampertronics.com.au
> * Electronic Design   * Technical Services   *
Contract Assembly
>
******************************************************


__________________________________
Do you Yahoo!?
Yahoo! Tax Center - File online by April 15th
http://taxes.yahoo.com/filing.html

Re: LCD backlight

2004-04-11 by Phil

Typically, the LED BL needs around 4.3 V so the drop from the 
transistor will put you right about there.

You could also configure it as an emitter follower and avoid the 
resistor altogether.  I do exactly this for the same purpose 
(switching on LED backlight in an LCD display) - works sweet.

Here's a page that talks about driving relays but the principles are 
the same and you dont need the diode.  
<http://ourworld.compuserve.com/homepages/Bill_Bowden/r_ctrl.htm> 
look at figure B.  Also, it has the info for sizing the resistor in 
case you leave your circuit the way it is.  

To be on the safe side, I use a POT to find out at what voltage the 
LED starts to work,  that will tell you if you need a dropping 
resistor.  I'd also measure current consumption just to make sure as 
well.  My guess its less than 100 mA so any cheap NPN like a 2n2222, 
2n3904, etc will be just fine.


--- In AVR-Chat@yahoogroups.com, jay marante <jaythesis@y...> wrote:
Show quoted textHide quoted text
> The problem is i dont have the datasheet. I just
> bought it from a local store. It doesnt have a name. I
> already made it work. I just dont know how to connect
> the backlight. Thanks for the help. -jay
> --- samperi@a...
> <samperi@a...> wrote:
> > At 08:01 PM 10/04/04 -0700, you wrote:
> > > Resistor (470 ohm)
> > 
> > This is probably too high. Check the data sheet it
> should show
> > the value for the series backlighting resistor and
> it may be
> > as low as 15 (one five) Ohms. Also you may get a
> better result
> > by using a small fet (2N7000??) for the switch
> instead of a transistor.
> > The VCC or anode is usually shown as "A" and the
> cathode or
> > Gnd is marked as "K"
> > 
> > Regards
> > 
> > John Samperi
> > 
> >
> ******************************************************
> >                         Ampertronics Pty. Ltd.
> >   11 Brokenwood Place Baulkham Hills, NSW 2153
> AUSTRALIA
> >          Tel. (02) 9674-6495       Fax (02)
> 9674-8745
> >                Email: samperi@a...
> >                  Website 
> http://www.ampertronics.com.au
> > * Electronic Design   * Technical Services   *
> Contract Assembly
> >
> ******************************************************
> 
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! Tax Center - File online by April 15th
> http://taxes.yahoo.com/filing.html

Re: LCD backlight

2004-04-15 by Patrick Timlin

--- In AVR-Chat@yahoogroups.com, jay marante <jaythesis@y...> wrote:
> The problem is i dont have the datasheet. I just
> bought it from a local store. It doesnt have a name. I
> already made it work. I just dont know how to connect
> the backlight. Thanks for the help. -jay

Just use an inline diode with the 5V and hook it up. The right way 
will light the backlight and the wrong way will do nothing with the 
diode protecting the backlight from being damaged.

Patrick

Re:Watchdog and sleep modes

2004-04-26 by jamie pollock

I am using the watchdog to come out of sleep mode. The watchdog seems to work fine ( i can turn it off sucessfully and re-enable it). My trouble is that when the watchdog resets it doesnot resume after the sleep. The controller begins at the reset vector and clears my registers. Is this what it is supposed to do? I think the documentation states that the registers would be intact.

Any help appreciated

Jamie.

Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25�

RE: [AVR-Chat] Re:Watchdog and sleep modes

2004-04-27 by Larry Barello

Yep. This is the most effective way to do a hard reset... The registers and SRAM shouldn't be affected, but if you are using C the startup runtime will clear everything out for you. The hardware registers (e.g. I/O & peripherals) will be wiped out.
You might get away with a bit of assembly code, intercept the reset vector (can't help you with how...) check to see the reset source and skip the C-runtime init code if it were watchdog. However, there would be a host of issues to resolve: which C variables need initializing, and which you want to save, etc. Not a trivial problem.
-----Original Message-----
From: jamie pollock

I am using the watchdog to come out of sleep mode. The watchdog seems to work fine ( i can turn it off sucessfully and re-enable it). My trouble is that when the watchdog resets it doesnot resume after the sleep. The controller begins at the reset vector and clears my registers. Is this what it is supposed to do? I think the documentation states that the registers would be intact.

Re: [AVR-Chat] Re:Watchdog and sleep modes

2004-04-27 by Brian Dean

On Mon, Apr 26, 2004 at 08:23:55PM -0700, Larry Barello wrote:

> Yep.  This is the most effective way to do a hard reset...  The
> registers and SRAM shouldn't be affected, but if you are using C the
> startup runtime will clear everything out for you. The hardware
> registers (e.g. I/O & peripherals) will be wiped out.
> 
> You might get away with a bit of assembly code, intercept the reset
> vector (can't help you with how...) check to see the reset source
> and skip the C-runtime init code if it were watchdog.  However,
> there would be a host of issues to resolve: which C variables need
> initializing, and which you want to save, etc.  Not a trivial
> problem.

If you are using GCC, you can place the variable(s) that you want the
runtime init code to leave alone in a section called '.noinit', i.e.:

	int foo __attribute__ ((section (".noinit")));

When declared this way, 'foo' will explicitly not be initialized by
the C runtime startup.  Of course, you should initialize it yourself
after you check the watchdog flag which is a good test to see if you
are executing due to a power-on reset or a watchdog reset.

-Brian
-- 
Brian Dean
http://www.bdmicro.com/

RE: [AVR-Chat] Re:Watchdog and sleep modes

2004-04-27 by jamie pollock

I am in assembly only, This is why i can't understand what to do to preserve the registers. I have tried storing the data in 0cr1a and r30,r29 ect. but it still wipes it out.I still need to check the mcusr to see if the watchdog is the only reset which is occuring.
If i use eeprom, it will wear it out. I want to have a index of cycles the micro is going through.

Larry Barello <yahoo@barello.net> wrote:
Yep.  This is the most effective way to do a hard reset...  The registers and SRAM shouldn't be affected, but if you are using C the startup runtime will clear everything out for you. The hardware registers (e.g. I/O & peripherals) will be wiped out. 
 
You might get away with a bit of assembly code, intercept the reset vector (can't help you with how...) check to see the reset source and skip the C-runtime init code if it were watchdog.  However, there would be a host of issues to resolve: which C variables need initializing, and which you want to save, etc.  Not a trivial problem.
Show quoted textHide quoted text
-----Original Message-----
From: jamie pollock 


I am using the watchdog to come out of sleep mode. The watchdog seems to work fine ( i can turn it off sucessfully and re-enable it). My trouble is that when the watchdog resets it doesnot resume after the sleep. The controller begins at the reset vector and clears my registers. Is this what it is supposed to do? I think the documentation states that the registers would be intact.



---------------------------------
Yahoo! Groups Links

   To visit your group on the web, go to:
http://groups.yahoo.com/group/AVR-Chat/
  
   To unsubscribe from this group, send an email to:
AVR-Chat-unsubscribe@yahoogroups.com
  
   Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 


		
---------------------------------
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs

RE: [AVR-Chat] Re:Watchdog and sleep modes

2004-04-27 by David VanHorn

At 05:48 AM 4/27/2004 -0700, jamie pollock wrote:

>I am in assembly only, This is why i can't understand what to do to preserve the registers. I have tried storing the data in 0cr1a and r30,r29 ect. but it still wipes it out.I still need to check the mcusr to see if the watchdog is the only reset which is occuring.
>If i use eeprom, it will wear it out. I want to have a index of cycles the micro is going through.

Store the data in SRAM.
SRAM isn't wiped out on reset, until your code wipes it.

Wearout in EEprom is an issue, but there are ways around that.
Initialize an area of EE to 0xFF, with the first pair of bytes, to 0x00.

When you want to store your counter data:
Write your counter to the first pair of bytes which is not 0xFF
Read it back. 
If it's not the same, then use the next pair of bytes in EEprom

When you want to read out the data, take the last pair of bytes that is NOT 0xFF.
Show quoted textHide quoted text
>Larry Barello <yahoo@barello.net> wrote:  
>Yep.  This is the most effective way to do a hard reset...  The registers and SRAM shouldn't be affected, but if you are using C the startup runtime will clear everything out for you. The hardware registers (e.g. I/O & peripherals) will be wiped out.  
>  
>You might get away with a bit of assembly code, intercept the reset vector (can't help you with how...) check to see the reset source and skip the C-runtime init code if it were watchdog.  However, there would be a host of issues to resolve: which C variables need initializing, and which you want to save, etc.  Not a trivial problem. 
>  
>  
>-----Original Message----- 
>From: jamie pollock  
>I am using the watchdog to come out of sleep mode. The watchdog seems to work fine ( i can turn it off sucessfully and re-enable it). My trouble is that when the watchdog resets it doesnot resume after the sleep. The controller begins at the reset vector and clears my registers. Is this what it is supposed to do? I think the documentation states that the registers would be intact.
>
>
>Do you Yahoo!?
><http://pa.yahoo.com/*http://us.rd.yahoo.com/hotjobs/hotjobs_mail_signature_footer_textlink/evt=23983/*http://hotjobs.sweepstakes.yahoo.com/careermakeover>Win a $20,000 Career Makeover at Yahoo! HotJobs 
>
>----------
>Yahoo! Groups Links 
>    * To visit your group on the web, go to: 
>    * <http://groups.yahoo.com/group/AVR-Chat/>http://groups.yahoo.com/group/AVR-Chat/ 
>    *   
>    * To unsubscribe from this group, send an email to: 
>    * <mailto:AVR-Chat-unsubscribe@yahoogroups.com?subject=Unsubscribe>AVR-Chat-unsubscribe@yahoogroups.com 
>    *   
>    * Your use of Yahoo! Groups is subject to the <http://docs.yahoo.com/info/terms/>Yahoo! Terms of Service.

RE: [AVR-Chat] Re:Watchdog and sleep modes

2004-04-28 by jamie pollock

I am using the attiny15l, which has no ram :( The test I did today resulted as follows:
 
The only reset occuring is the watchdog.
If i place a  statments like:
***********************************************
in cpu_reset,mcusr       ; retrieve reset flags
clr temp
out mcusr,temp     ;clear reset flags
sbrc cpu_reset,3   ; run init if not wdt reset
rjmp main
init:
ldi temp,$0f     ; setup watchdog
out wdctr,temp
main:

*********************************************
The watchdog does not run the second time. I read that the watchdog can only be shut off by a series of statements.
 
What could be killing the mcu? Shouldn't the watchdog survive its own reset?
 
Jamie

David VanHorn <dvanhorn@cedar.net> wrote:
At 05:48 AM 4/27/2004 -0700, jamie pollock wrote:

>I am in assembly only, This is why i can't understand what to do to preserve the registers. I have tried storing the data in 0cr1a and r30,r29 ect. but it still wipes it out.I still need to check the mcusr to see if the watchdog is the only reset which is occuring.
>If i use eeprom, it will wear it out. I want to have a index of cycles the micro is going through.

Store the data in SRAM.
SRAM isn't wiped out on reset, until your code wipes it.

Wearout in EEprom is an issue, but there are ways around that.
Initialize an area of EE to 0xFF, with the first pair of bytes, to 0x00.

When you want to store your counter data:
Write your counter to the first pair of bytes which is not 0xFF
Read it back. 
If it's not the same, then use the next pair of bytes in EEprom

When you want to read out the data, take the last pair of bytes that is NOT 0xFF.


>Larry Barello <yahoo@barello.net> wrote:  
>Yep.  This is the most effective way to do a hard reset...  The registers and SRAM shouldn't be affected, but if you are using C the startup runtime will clear everything out for you. The hardware registers (e.g. I/O & peripherals) will be wiped out.  
>  
>You might get away with a bit of assembly code, intercept the reset vector (can't help you with how...) check to see the reset source and skip the C-runtime init code if it were watchdog.  However, there would be a host of issues to resolve: which C variables need initializing, and which you want to save, etc.  Not a trivial problem. 
>  
>  
>-----Original Message----- 
>From: jamie pollock  
>I am using the watchdog to come out of sleep mode. The watchdog seems to work fine ( i can turn it off sucessfully and re-enable it). My trouble is that when the watchdog resets it doesnot resume after the sleep. The controller begins at the reset vector and clears my registers. Is this what it is supposed to do? I think the documentation states that the registers would be intact.
>
>
>Do you Yahoo!?
><http://pa.yahoo.com/*http://us.rd.yahoo.com/hotjobs/hotjobs_mail_signature_footer_textlink/evt=23983/*http://hotjobs.sweepstakes.yahoo.com/careermakeover>Win a $20,000 Career Makeover at Yahoo! HotJobs 
>
>----------
>Yahoo! Groups Links 
>    * To visit your group on the web, go to: 
>    * <http://groups.yahoo.com/group/AVR-Chat/>http://groups.yahoo.com/group/AVR-Chat/ 
>    *   
>    * To unsubscribe from this group, send an email to: 
>    * <mailto:AVR-Chat-unsubscribe@yahoogroups.com?subject=Unsubscribe>AVR-Chat-unsubscribe@yahoogroups.com 
>    *   
>    * Your use of Yahoo! Groups is subject to the <http://docs.yahoo.com/info/terms/>Yahoo! Terms of Service. 



---------------------------------
Yahoo! Groups Links

   To visit your group on the web, go to:
http://groups.yahoo.com/group/AVR-Chat/
  
   To unsubscribe from this group, send an email to:
AVR-Chat-unsubscribe@yahoogroups.com
  
   Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 


		
---------------------------------
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.