Load needed for circuit to work ?


Closed Thread
Results 1 to 7 of 7
  1. #1
    Join Date
    Sep 2006
    Posts
    747

    Default Load needed for circuit to work ?

    Hi,

    I discovered a new problem which I never seen or heard of before. My circuit works fine with the LCD hooked up. I removed the LCD restart and the pins output goes haywire..
    I removed all the coding concerning the LCD in the program, did not work. Turns out, if I do not have 56 ohm resistance between the positive and negative, the circuit will not function properly. This resistance also need to be placed on the MCLR / ground rail !!!

    here is the code I have, but I am not sure this will make a difference because the code does work with the 56ohm resistance..
    Code:
    'using a pic16F88  - on cart trial module.
    ' MPASM  Header
    
    
    INCLUDE "modedefs.bas"
     OSCCON = %01110000 '8 Mhz
     Define OSC 8 
      
    CMCON = 7 : ANSEL = 0 : ADCON1 = 7
    
    
    ' Define ADCIN parameters
    Define  ADC_BITS        8         ' Set number of bits in result
    Define  ADC_CLOCK       3         ' Set clock source (3=rc)
    Define  ADC_SAMPLEUS    50        ' Set sampling time in uS
    
    ADCON1 = %00000010 'for 8 bit
    
    
     value var word : variable var word : i var byte 
    
    'TRISA = %00000000      ' Set PORTA to all output
    TRISB = %10000000
    PORTB.1 =0
    PORTB.2 =0
    PORTB.3 =0
    PORTB.4 =0
         
    mainloop:
    
     ADCON0.2 = 1            'Start Conversion
        ADCIN 6, value 'Read channel PORTB.7
        pause 100
        
    variable = 256 -value 
    variable = variable *14    
    pause 30
     
    
    i=1
    while i<=variable
        PORTB.1 =1
        PORTB.2 =1
        PORTB.3 =1        'green led
        PORTB.4 =0        'red led
        i=i+1
        pause 1000
    wend
    
    i=1
    while i<=variable
        PORTB.1 =0
        PORTB.2 =0
        PORTB.3 =0    'green led
        PORTB.4 =1    'red led
        i=i+1
        pause 1000
    wend 
        
        
    goto MAINloop
    
    end

  2. #2
    Join Date
    Apr 2007
    Location
    Pennsylvania, USA
    Posts
    158


    Did you find this post helpful? Yes | No

    Default Re: Load needed for circuit to work ?

    Have you measured your supply voltage without a load on it? It could be to high...
    Shawn

  3. #3
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default Re: Load needed for circuit to work ?

    I have an LM7805, so it is 5v., its pulling about 140mA with the resistor, which half of the current comes from the resistor.

  4. #4
    Join Date
    Mar 2011
    Location
    Los Angeles, California
    Posts
    322


    Did you find this post helpful? Yes | No

    Default Re: Load needed for circuit to work ?

    Hi Lerameur!
    Your description is a little confusing. From my experience, MCLR (pin 4) is typically tied to +5v thru a 10K resistor. Pin 5 should be ground and pin 14 should be +5v. A 56 ohms will draw about .089 amps so for all intents and purposes it is almost a short! Do you have maybe a one-line (schematic) of how you have things wired? Also what type of power (+5v) source are you using? Best, Ed

  5. #5
    Join Date
    Mar 2011
    Location
    Los Angeles, California
    Posts
    322


    Did you find this post helpful? Yes | No

    Default Re: Load needed for circuit to work ?

    Hi Lerameur!
    As I was answering your post my second question was answered, you are using a 7805. So the next question would be did you install the .1mfd and some other value capacitors on the output of the 7805? The reason I ask is that 7805's as well as other voltage regulators will oscillate if there are no capacitors. Once the oscillations start eveything will act "spritual" (technical term) as the PIC is basically being powered by a form of AC and not pure DC! Best, Ed

  6. #6
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default Re: Load needed for circuit to work ?

    Ooo. thank you for your help Ramius, I forgot to put the capacitor. what a difference this little thing can do. Works good now.

  7. #7
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default Re: Load needed for circuit to work ?

    Quote Originally Posted by Ramius View Post
    Once the oscillations start everything will act "spiritual" (technical term) as the PIC is basically being powered by a form of AC and not pure DC! Best, Ed
    Thanks for that Ed, The term "spiritual" best description ever I think.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts