Serin serout problem


Closed Thread
Results 1 to 40 of 337

Hybrid View

  1. #1
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default

    Ok I am continuing my project.
    I get a compiling error for my If then loop:
    If I hide the two last line , then I dont get any error. But I need those lines. Any ideas?

    if portb.0 = 1 then goto Option1
    if portb.1 = 1 then goto Option2
    if portb.2 = 1 then goto Option3
    if portb.3 = 1 then goto stopping
    else goto stopping
    endif


    error:
    C:\PBP\MOTORG.BAS ERROR Line 62: Syntax error.
    C:\PBP\MOTORG.BAS ERROR Line 63: ENDIF without a matching IF..THEN.
    C:\PBP>

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by lerameur View Post
    Ok I am continuing my project.
    I get a compiling error for my If then loop:
    If I hide the two last line , then I dont get any error. But I need those lines. Any ideas?

    if portb.0 = 1 then goto Option1
    if portb.1 = 1 then goto Option2
    if portb.2 = 1 then goto Option3
    if portb.3 = 1 then goto stopping
    else goto stopping
    endif


    error:
    C:\PBP\MOTORG.BAS ERROR Line 62: Syntax error.
    C:\PBP\MOTORG.BAS ERROR Line 63: ENDIF without a matching IF..THEN.
    C:\PBP>
    if portb.3 = 1 then
    goto stopping
    else
    goto stopping
    endif

    You can't have that first 'goto stopping' on the same line as the if/then if you're using an if/then/else type statement

  3. #3
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default

    HI,
    hope you are doing good.
    I read a thread on this site concerning the 7805 overheating.
    My 7805 is overheating even with a heat sink and I just have a LCD a pic chip and a RF receiving module. I tried the tricks they say but none is working.
    I tried conencting the backlight directly to the 12v battery using a 150 IOhm resistor, or t o the 5V output of the 7805 with a 22 ohm resistor. Whils always keeping the LCD Vdd to the 5v of the 7805.
    It heats op in every case ?
    any ideas ?
    Lcd 16 x2: UNIQ/eVision GC-1602I1
    Last edited by lerameur; - 2nd February 2007 at 00:04.

  4. #4
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by lerameur View Post
    HI,
    hope you are doing good.
    I read a thread on this site concerning the 7805 overheating.
    My 7805 is overheating even with a heat sink and I just have a LCD a pic chip and a RF receiving module. I tried the tricks they say but none is working.
    I tried conencting the backlight directly to the 12v battery using a 150 IOhm resistor, or t o the 5V output of the 7805 with a 22 ohm resistor. Whils always keeping the LCD Vdd to the 5v of the 7805.
    It heats op in every case ?
    any ideas ?
    Lcd 16 x2: UNIQ/eVision GC-1602I1
    What is your input voltage to the 7805? 12v?
    What do you mean by 'overheating'? It's actually overheating and shutting down or just getting hot?
    Put a meter across the 5v and ground lines at their input to the board. What does it read when using the resistance setting? What does it read when using the diode-check (continuity) setting?

    This should help get it narrowed down...

  5. #5
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default

    It is 12v
    I am getting .22amp It is getting very hot, but not shutting down.
    Should I put a bigger heat sink or maybe two Lm7805 ?

  6. #6
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by lerameur View Post
    It is 12v
    I am getting .22amp It is getting very hot, but not shutting down.
    Should I put a bigger heat sink or maybe two Lm7805 ?
    Here's a bit of math for ya...
    12v input @ .22 amp = 2.64 watts total
    5v output, drawing .22 amp = 1.1 watt.
    (don't know if you're familiar with this stuff yet)

    The regulator has to 'dump' 7v @ .22amp, which is 1.54 watts. That doesn't seem like a lot, but it's enough to make the 7805 hot, even if you've got a heat sink on it.

    Do you have any heat sink compound between the 7805 and the heat sink face itself?

    (oh...and .22amp for your configuration sounds about right)

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by lerameur View Post
    HI,
    hope you are doing good.
    I read a thread on this site concerning the 7805 overheating.
    My 7805 is overheating even with a heat sink and I just have a LCD a pic chip and a RF receiving module. I tried the tricks they say but none is working.
    I tried conencting the backlight directly to the 12v battery using a 150 IOhm resistor, or t o the 5V output of the 7805 with a 22 ohm resistor. Whils always keeping the LCD Vdd to the 5v of the 7805.
    It heats op in every case ?
    any ideas ?
    Lcd 16 x2: UNIQ/eVision GC-1602I1

    Hi Ken,
    Here are some figures for you to "SMOKE OVER" pun intended.
    you need to add up the current draw of all of your outputs, and other loads and make sure you are not overloading your 7805 and your PIC. OR hook your DVM in series on the amp scale.
    LED @ 4 volts at 45 ma hooked to 5 volt = 22 ohm
    LED @ 4 volts at 20 ma hooked to 5 volt = 50 ohm
    LED @ 5 volts at 20ma hooked to 12v =350 ohm
    LED @ 5 volts at 40ma hooked to 12v = 140 ohm
    LED @ 4 volts at 20 ma hooked to 12 volts = 400 ohms
    LED @ 4 volts at 40 ma hooked to 12 volts = 200 ohms
    the formula is still Rs = Vin - V led / I led. Where V in is input voltage, V led is led voltage and I led is LED current in ma.
    Hope this is helpful.
    JS
    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.

  8. #8
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default

    well because i still need all of these components. Its drawing way too much. 1.1 a out of 1amp max.

    what about putting 2 Lm7805 in parallel?
    Last edited by lerameur; - 2nd February 2007 at 01:28.

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


    Did you find this post helpful? Yes | No

    Default dual supply

    Quote Originally Posted by lerameur View Post
    well because i still need all of these components. Its drawing way too much.
    what about putting 2 Lm7805 in parallel?
    Honestly Ken,
    I do not know if that works or not, That is a linear IC and I am not too sure how they will interact. I think a better solution would be to use a bigger regulator IC, or use 2 or more 7805s as seperate supplies using a common ground. Your pic can sink current from the secondary supply, and your display could also run from it. Note: check the data sheet for maximum current the pic can handle in total, so as not to exceed.
    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.

  10. #10
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by lerameur View Post
    well because i still need all of these components. Its drawing way too much. 1.1 a out of 1amp max.

    what about putting 2 Lm7805 in parallel?
    You just said you were drawing .22amp...
    Which one is it? 1.1 a or .22 a ?

  11. #11
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default

    sorry 1.1watt
    These babies can draw 1amp, why cant I draw more then .22 without being very hot ?
    I dont see the wattage value on the spec sheet of this chip,
    Last edited by lerameur; - 2nd February 2007 at 02:02.

Similar Threads

  1. A Serial GLCD 128x64 Simple Project
    By Oldspring in forum Off Topic
    Replies: 0
    Last Post: - 8th March 2010, 20:58
  2. PIC16f877 code crosses boundary @800h
    By inventosrl in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 6th April 2009, 22:03
  3. serout and serin problem
    By nicolelawsc in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 11th April 2006, 19:44
  4. Replies: 11
    Last Post: - 13th July 2005, 19:26
  5. SerIn and SerOut
    By Dwayne in forum FAQ - Frequently Asked Questions
    Replies: 0
    Last Post: - 21st July 2004, 15:54

Members who have read this thread : 0

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