first project, and yes, doesn`t work


Closed Thread
Results 1 to 16 of 16

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by bogdan View Post
    Joe: ...i don't think i have to use DEFINE, because i already setup the fuse @ __config _LP_OSC
    That was Shane . . .
    Quote Originally Posted by ShaneMichael View Post
    Another thing I have a question on, you are using a 32khz crystal. I believe PBP defaults to 4 mhz unless something is Defined for OSC speed.

    DEFINE OSC 8

    for 8Mhz clock.

    Without that I don't know if PBP would know what to do?

    I don't know that 32 khz can be defined in PBP? Some one else that knows more than me might have some better input?

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

  2. #2
    Join Date
    Apr 2009
    Location
    Boise, Id
    Posts
    44


    Did you find this post helpful? Yes | No

    Default

    Do they make a data sheet for dummies? I could use one. So reading the data sheet I noticed this statement:

    "6.4 Timer1 Oscillator
    A low-power 32.768 kHz crystal oscillator is built-in
    between pins OSC1 (input) and OSC2 (amplifier
    output). The oscillator is enabled by setting the
    T1OSCEN control bit of the T1CON register. The
    oscillator will continue to run during Sleep.
    The Timer1 oscillator is shared with the system LP
    oscillator. Thus, Timer1 can use this mode only when
    the primary system clock is derived from the internal
    oscillator or when the oscillator is in the LP mode. The
    user must provide a software time delay to ensure
    proper oscillator start-up."

    So by that statement I believe you want to use the internal OSC, I'd use it at 4 or 8 mhz.

    Timer one you would use the external crystal and set T1OSCEN =0 so you don't turn on the interal 32.768 crystal....I think? Like I said, I need a data sheet for dummies...

    I'd take on one thing at a time, get the pic working on the internal clock first. When you have a good handle on that then take on clocking Timer one from the crystal. Then as it breaks, you'll know what setting did it.

    Also, if it has an internal crystal at 32.768 khz, why use an external, is it just an accuracy concern?

    I don't think you'll need to dig any deeper than you already are, it's just a matter of getting the correct settings.

    Good Luck,
    Shane

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