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

    The LE high and low is not an LED but a Latch enable on the PLL chip to tell it to load in the data in the shift register when shifting is done.

    I probably should set an led somewhere to blink to confirm operation of the micro controller. Will do this next.

    I am using an MELabs U2 Programmer. It reads and writes no problems. I have set the oscillator to INTRCIO in the MELabs programmer, which should be the internal oscillator?, and still no dice.

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by kessral View Post
    I probably should set an led somewhere to blink to confirm operation of the micro controller. Will do this next.
    It's always been my 2nd step after a failure...
    Actually that's not true. Everything I've built in the past few years has included a 'heartbeat' LED driven by a timer interrupt. LED blinks, no questions as to whether or not the circuit is operating...correctly or otherwise...

  3. #3
    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?

  4. #4
    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...

  5. #5
    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.

  6. #6
    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.

  7. #7
    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.

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