visualize clockout


Closed Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2006
    Location
    brooklyn
    Posts
    33

    Default visualize clockout

    hi-ho,

    had this posted on the PicBasic side. it's lonely there.
    i'd like to get the PIC to control a TLC5940 PWM controller for LEDs and whatnot. i have a grip on how the chip works, and how to format the data to its registers, but the 5940 requires a clock signal to time the PWM. [4096 cycles, a little handshake, 4096 more cycles...] i'm thinking 'hey, there's that TMR1 right there, why not, you know...' so i'm just ramping up on getting the CCP and TMR1 to talk to eachother. part of my solution for timing the PWM is to use the INTRC (clockout) configuration. i'm running a 16F88 and have gotten some good results with my test code, and i want to visualize the clockout on RA6. so, i went ahead and put an LED on it. it gives a little blink when the program starts up, but then nothing. what's going on? am i asking too much of the little OSC2? i even put my multimeter on it, thinking that i would at least see some +V... nuthin.
    simple code below. sorry darryl, i'm not using your amazing thing.
    as a side note, the software toggle of B.4 goes on and off like you read about. but the mulitplexed B.3 just sits there sorta 'on' even though i'm setting it low in the isr. i woulda thought that it would also give me some kind of pulsing output.


    16F88, INTRC clockout, disable BOR due to 3V3


    OSCCON = %0110110 '4MHz INTERNAL OSCILLATOR
    ANSEL = %00000000 'MAKE PortA PINS ALL DIGITAL
    TRISB = %00000000

    LED VAR PortB.4
    LED1 VAR PortB.3

    T1CON = %00100001 'ENABLE TIMRE ONE, PRESCALE 1:1, USE INTERNAL CLK
    INTCON = %11000000 'ENABLE GLOBAL INT, ENABLE PERIPHERAL INT,
    PIE1 = %00000100 'ENABLE CCP1 INT
    CCP1CON = %00001000 'COMPARE MODE, SET OUTPUT ON MATCH

    CCPR1L = %00000000 'SET CCP REGISTER TO 4069
    CCPR1H = %00010000

    on interrupt goto ISR


    Main:
    PAUSE 1
    GOTO Main

    DISABLE
    ISR:
    TOGGLE LED
    LOW led1
    PIR1.2 = 0
    TMR1H = 0
    TMR1L = 0
    RESUME
    ENABLE

  2. #2
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  3. #3
    Join Date
    Aug 2006
    Location
    brooklyn
    Posts
    33


    Did you find this post helpful? Yes | No

    Default lonely

    yes it's a duplicate.
    but it seems that everyone is hanging out in the PBP room, and it's a PBP problem. it was miss-posted over there.
    have had a chance to connect to the TLC5940 and it is not working. my suspicion is that the clockout function on RA6 is failing. does anyone have a clue as to why? i'll go in and bang my head against it tomorrow, but it seems to be a basic function of the chip to produce a reliable clockout.

    baffled in brooklyn.

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


    Did you find this post helpful? Yes | No

    Default

    Have you read the reply to your other post?
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

Similar Threads

  1. Visualize Clockout
    By JoelMurphy in forum mel PIC BASIC
    Replies: 2
    Last Post: - 6th December 2008, 13:41
  2. Replies: 4
    Last Post: - 25th September 2008, 23:50

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