16F628 and LMX2306 PLL loading.. help


Closed Thread
Results 1 to 14 of 14

Hybrid View

  1. #1
    Join Date
    Jan 2007
    Posts
    15


    Did you find this post helpful? Yes | No

    Default

    Well I changed the code to this:

    TRISB = %11111111 'set all pins 0-7 to input
    TRISA = %00111100 'set pins 0,1,6,7 to output and pins 2,3,4,5 to input
    CMCON = %00000111 'turn off on-board comparators

    Include "modedefs.bas"

    Low PORTA.1 'for LED
    Low PORTA.6

    Pause 500

    SHIFTOUT PORTA.7,PORTA.0,MSBFIRST,[0\13, 131\8] 'send F reg
    High PORTA.6 'LE high
    PAUSE 10
    Low PORTA.6 'LE low

    high porta.1
    pause 500 'blink LED
    low porta.1

    SHIFTOUT PORTA.7,PORTA.0,MSBFIRST,[0\9, 4000\12] 'send R reg
    High PORTA.6 'LE high
    PAUSE 10
    Low PORTA.6 'LE low

    high porta.1
    pause 500 'blink LED
    low porta.1

    SHIFTOUT PORTA.7,PORTA.0,MSBFIRST,[1\1, 2566\13, 2\5, 1\2] 'send N reg
    High PORTA.6 'LE high
    PAUSE 10
    Low PORTA.6 'LE low

    high porta.1
    pause 500 'blink LED
    low porta.1

    ---------------------------------------------
    No blinking going on and no highs on an scope from pin 18. Does this mean it is a bad chip even though it reads and writes fine? Or is there something amiss/wrong in my code?

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by kessral View Post
    Well I changed the code to this:
    well then, change the code to this:
    Code:
    trisb=$ff:trisa=$3c:cmcon=7
    main: porta.1=1:pause 500:porta.1=0:pause 500:goto main
    goto main
    That's known as ol' blinky... See how it's about as simple as you can get...the lowest common denominator...end of the line...edge of the cliff...low man on the pole...last drop in the bucket...
    If something like that doesn't work, then I'd be willing to bet that any communications you are trying to do with that LMX2306, or any other chips anywhere in this world (or others) at this time (or any other in the past or the future or otherwise) isn't going to work either.

    Does this mean it is a bad chip even though it reads and writes fine?
    I've got this car in the backyard. The doors open and close just fine...but it won't start. Does that mean the whole car is bad?

    Or is there something amiss/wrong in my code?
    Ya think?
    Is your circuit perfect? Are you sure? HOW can you be sure? Does the code you've tried run? No? Then you can't be sure your circuit is perfect... ALL you can do is assume.

    In other words..............
    Break it back down...then build it up in steps...

  3. #3
    Join Date
    Jan 2007
    Posts
    15


    Did you find this post helpful? Yes | No

    Default

    Yes! The circuit is perfect! Everything is perfect, its just bad luck. LOL J/k

    I will try replacing the chip Monday and I'll get back with the results. I am teaching myself this micro controller stuff right now so thanks for all your help and patience.

    Have a good weekend.

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


    Did you find this post helpful? Yes | No

    Default The answer is probably in front of you . . .

    Hi Kessral,
    Go back to post #2 where Ski gave you the answer . . . How are your configs set? How have you configured the OSC. ? Have you looked at what Ports A5,6,7 do?
    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.

  5. #5
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Joe S. View Post
    Have you looked at what Ports A5,6,7 do?
    16F628...not 16F628A... doesn't apply in this case...well, mostly doesn't apply.

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by skimask View Post
    16F628...not 16F628A... doesn't apply in this case...well, mostly doesn't apply.
    Not sure what YOU mean Jeremy, I meant 5=mclr 6= osc/clkout, 7= osc/clkin, if he is using xtal or resonator, or wrong configs then ports will not work. Is there a pullup resistor on a.5? Is there a .1 µf cap between pins 5 and 14 ? Sometimes it helps to erase the chip several times prior to programming too.
    Last edited by Archangel; - 24th May 2008 at 10:37.
    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.

  7. #7
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Joe S. View Post
    Not sure what YOU mean Jeremy
    Ok, I thought that you might have been thinking analog vs. digital pins.
    F628 has comparators but no ADC, F628A has both...
    I've shot myself in the foot more than once by forgetting that sort of thing

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