16F88 internal clock configuration


Closed Thread
Results 1 to 29 of 29

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default

    o.k now it seems more a hardware problem than a software problem. be sure your supply line is neat an un-noisy. 10uF tantalum+0.1uF must be place close to your PIC... AS close as you can.

    AND be sure your MCLR pin is tie to VCC via resistor.

    Enable power-up timer can be great. Also as Melanie previously said it can be interesting to test the 'oscillator frequency is stable bit' before proceed to any of your initialisation process.

    look at the a/d register setting(ADCON and others)... i'm sure that they're different from the PIC you used before.
    Steve

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

  2. #2
    Join Date
    Feb 2005
    Location
    Bellevue
    Posts
    125


    Did you find this post helpful? Yes | No

    Default hardware profile..

    The hardware is pretty skimpy.. I have the F88 a 5.1v supply, and a resistor from MCLR to power. I have only power and ground supplied, and then serial lines out from the appropriate port pins. No caps no nothing.

    Whats odd is that with small program.. like only a portion of the one I am porting over, it works. It wakes up, it does its routine, then it starts doing a simple read from data input, put data into array, and read data from array out to the three serial outputs. This works fine.

    Whats odd is when I put my WHOLE program in place, it chokes.. It periodically shows the data, but when it does the math is always wrong, and it looks to be resetting as I see the initialize routine results now and then.

    I don't know about ADCON as I am only doing serial data in on Port B1, and serial data out on B2 and also A0,A1. I am setting the serial data out on A1 to 4800b by using SERIN2, and the rest is 9600b. - But again, this seems to work fine with a smaller program...

    Must be some timing setting beyond what I've had to set before.

    TG

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


    Did you find this post helpful? Yes | No

    Default

    so there's no analog to digital conversion on a.0 and a.1 ???

    you must disable those analog pins to make them digital.. at least

    ANSEL=3 'set a.0 and a.1 as digital input

    and capacitor should be consider.
    Last edited by mister_e; - 7th March 2005 at 16:26.
    Steve

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

  4. #4
    Join Date
    Feb 2005
    Location
    Bellevue
    Posts
    125


    Did you find this post helpful? Yes | No

    Default

    Set the .. ANSEL=3 'set a.0 and a.1 as digital input, thx. Probably a good idea, but did not have any impact.

    Oddly as I test, I find that my setting for OSCAL 8 mhz or OSCAL 4 Mhz does not have any impact on the system..

    I have tried:

    OSCCON=%01101000 ' 4 mhz
    DEFINE OSC 4

    ----

    and in another test...

    DEFINE OSC 8
    OSCCON=%01111000 '8 Mhz


    Something must not be getting written somewhere. I'd expect that these settings would have a big impact on overall system operation.

    Is there some prescaler setting that I am missing?

    tg

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


    Did you find this post helpful? Yes | No

    Default

    prescaller have nothing to do with your code if you're not using TIMERs. Can you post your code here or it's a 'military secret'
    Steve

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

  6. #6
    Join Date
    Feb 2005
    Location
    Bellevue
    Posts
    125


    Did you find this post helpful? Yes | No

    Default Program posting - no military secret here!

    This program reads a data sentence sent at 9600b 8,1.n. The sentence has two start bytes, then 34 data bytes. It works on the 16F876A on the test board from Microchip, but the plain old F88 on my breadboard is acting strange as the thread indicates..

    TG
    Attached Files Attached Files

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


    Did you find this post helpful? Yes | No

    Default

    reason is simple... you run out of memory...

    PIC16F876 : 8K
    PIC16F88: 4K
    YourCode :4287 words

    so you can for sure shrink it using internal or external EEPROM instead of arrays and few other things. It has to fit in a 4k memory space
    Steve

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

Similar Threads

  1. 16F88 bootlader with Internal OSC
    By HenrikOlsson in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 2nd August 2009, 10:15
  2. external clock / internal clock
    By grounded in forum General
    Replies: 4
    Last Post: - 31st May 2008, 17:44
  3. Setting up internal clock correctly?
    By JohnM in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 18th March 2008, 20:29
  4. 16F688 Internal clock and MCLR
    By manxman in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 18th August 2007, 18:38
  5. Help with sound command in 2 programs
    By hyperboarder in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 5th July 2007, 20:36

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