odd 2550 behaviour


Closed Thread
Results 1 to 11 of 11
  1. #1

    Default odd 2550 behaviour

    I mistyped this in a program ( I quickly wanted to blink an LED on portA)

    high porta.1
    pause 500
    high porta.0
    pause 500
    high porta.1
    pause 500
    high porta.0
    pause 500
    high porta.1
    pause 500
    high porta.0
    pause 500

    See the problem, they all should be portA.0, so in theory the LED on PortA.1 should light, slight pause, then the LED on PortA.0 should light.

    Ha, no it doesnt, well OK it does BUT the first led (on PortA.1) goes out, and instead of 2 leds being on, I get alternating leds ????

    Ie

    01
    10
    01
    10

    I expected

    01
    11


    (edit)

    'alldigital' fixed it so I must have one of those damn 'con' keywords wrong.....
    Last edited by f_lez; - 3rd November 2006 at 12:32.

  2. #2
    Join Date
    Sep 2006
    Location
    Mexico
    Posts
    47


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by f_lez
    I mistyped this in a program ( I quickly wanted to blink an LED on portA)

    high porta.1
    pause 500
    high porta.0
    pause 500
    high porta.1
    pause 500
    high porta.0
    pause 500
    high porta.1
    pause 500
    high porta.0
    pause 500

    See the problem, they all should be portA.0, so in theory the LED on PortA.1 should light, slight pause, then the LED on PortA.0 should light.

    Ha, no it doesnt, well OK it does BUT the first led (on PortA.1) goes out, and instead of 2 leds being on, I get alternating leds ????

    Ie

    01
    10
    01
    10

    I expected

    01
    11


    (edit)

    'alldigital' fixed it so I must have one of those damn 'con' keywords wrong.....
    You have a mistake, need to use low to turn off.

  3. #3


    Did you find this post helpful? Yes | No

    Default

    Yes I had, but that was not the reason for the post, if you had read it...........

  4. #4
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    If 'alldigital' fixed it, then you're on the wrong forum!

  5. #5


    Did you find this post helpful? Yes | No

    Default

    Ok I add 'alldigital' to my code and I compile and it works, but its not a supported command.......


    Scary........


    Ok save the hex, recompile without the 'alldigital' and compare the hex, no difference............

    Damn these chips!

    I'll just go sit in a corner for a while and rock back and forth.

  6. #6
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    f_lez,

    To make it clear, "alldigital" is not a command of PBP's.

    It is a command of another compiler.

    Thus, one should avoid posting "things" about another compiler on this forum.

    That is what Melanie kindly meant.


    --------------------------------
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  7. #7
    claxon1's Avatar
    claxon1 Guest


    Did you find this post helpful? Yes | No

    Default

    chill down sayser,

    and read the posts carefully.

    ps:

    I'm sure if Melanie would need a parrot she'll buy one

    cheers

  8. #8
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    i suggest our friend open the PIC datasheet in section 21(analog converter) and 22(analog comparator)

    From there, you have to find how to disable AllAnalog stuff to make your i/o AllDigital.

    Claxon1... you should read and write better the name of Sayzer
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

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


    Did you find this post helpful? Yes | No

    Default everything is logical if you ever find it . . .

    Quote Originally Posted by f_lez
    Ha, no it doesnt, well OK it does BUT the first led (on PortA.1) goes out, and instead of 2 leds being on, I get alternating leds ????
    ....
    This could be your code doing this, or if you have an unstable ground and mishmatched LEDs it will also behave this way. Certainly you have some code issues, I just wanted to remind you of the other posibility. Sometimes it is the hardware. A pic which has suffered an ESD will often behave badly as well.
    Cheers
    JS

  10. #10
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by claxon1
    chill down sayser,

    and read the posts carefully.

    ps:

    I'm sure if Melanie would need a parrot she'll buy one

    cheers


    (let be it)
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  11. #11


    Did you find this post helpful? Yes | No

    Default

    Ok lets take all the comments in no particular order...........

    The pic could be faulty, but I doubt it as its running fine now, maybe it did not program correctly but it should have 'verify failed', maybe it did and I was so rushing and never noticed that. possible.

    I get bogged down in the data sheets so I often just look at code examples and try things, possibly not most efficient but a better learning process than reading a monitor, which I hate, I'm a paper person, I cant read online books, I cant watch online movies, I need a big screen and cocoa.........

    As to quoting commands form other compilers, it was in a code example I came across via Google, website unknown, I did not know it was from another pic basic.

    Mel, I took what she said in the fun (I hope!) way it sounded to me, get a life people and dont take it serious, I didnt!

    I'm sure if she wanted to 'scold' me she could quite venomous if needed!
    (its in the eyes, look at the picture, trust me I knew a woman with eyes like that, one each side, lovely to stare into over a movie, but just try and take the last cookie.....)

Similar Threads

  1. Strange Behaviour - Simple code+DT_INT+16F676
    By financecatalyst in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 17th February 2010, 18:53
  2. Strange Serout Behaviour
    By bluesmoke in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 12th August 2009, 04:12
  3. Is Number Odd?
    By T.Jackson in forum Off Topic
    Replies: 29
    Last Post: - 11th June 2008, 17:53
  4. Strange behaviour from PIC16F877 on TMR0
    By mikebar in forum mel PIC BASIC Pro
    Replies: 18
    Last Post: - 19th August 2006, 01:31
  5. odd? network problem
    By d1camero in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 30th April 2004, 18:33

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