16f818 Fuses


Closed Thread
Results 1 to 8 of 8

Thread: 16f818 Fuses

  1. #1
    Join Date
    May 2012
    Location
    Merseyside, UK
    Posts
    237

    Question 16f818 Fuses

    Hi all.

    1) Using the internal oscillator to do some basic stuff which is working great (Surprise to me )
    But now I want to use the I/O ports tied up with the oscillator output.... I am using "INTRC_CLKOUT" at moment.
    "INTRC_NOCLKOUT" just results in errors ??


    2) I have some code (timing non critical) working fine elsewhere with a little 12Megs crystal and 2 22pf caps.... I want to remove the crystal to cut costs. But when I take the crystal out and use the internal RC circuit I get corruption on my 4bit lcd, display also misses characters ... This is repeatable ... I didn't think the LCD timing was so reliant on the clock ?

    Thank you for reading

    BR
    Andy

  2. #2
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,520


    Did you find this post helpful? Yes | No

    Default Re: 16f818 Fuses

    Hi,

    1) Where did you find it should be INTRC_NOCLKOUT? For the 16F818, try INTRC_IO instead.

    2) The HD44780 (and compatible controllers) needs a certain delay for commands and data (which is what the DEFINE LCD_DATAUS 50 etc is for). If the program is written for a 12MHz clock but you change to, say 32MHz internal oscillator without telling the compiler that you did, then the 50us datadelay (default) becomes 12us. If you changed to LOWER oscillator frequency I wouldn't expect it to corrupt the display. Can you elaborate a little bit on what you actually did?

    /Henrik.

  3. #3
    Join Date
    May 2012
    Location
    Merseyside, UK
    Posts
    237


    Did you find this post helpful? Yes | No

    Default Re: 16f818 Fuses

    Hi Henrick

    1) Where did you find it should be INTRC_NOCLKOUT? For the 16F818, try INTRC_IO instead.
    Mixed up with 16f628 .... My Bad Thank you

    2) The HD44780 (and compatible controllers) needs a certain delay for commands and data (which is what the DEFINE LCD_DATAUS 50 etc is for). If the program is written for a 12MHz clock but you change to, say 32MHz internal oscillator without telling the compiler that you did, then the 50us datadelay (default) becomes 12us. If you changed to LOWER oscillator frequency I wouldn't expect it to corrupt the display. Can you elaborate a little bit on what you actually did?

    I dropped from 12Megs external to 8Megs Internal... Used Oscon = $70 from memory! Fastest the 818 goes is 8megs ?

    Thank for help
    Andy

  4. #4
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,520


    Did you find this post helpful? Yes | No

    Default Re: 16f818 Fuses

    Hi Andy,
    OSCON = $70 doesn't look right but doesn't really matter. You're correct, 8MHz is as fast as it can go so I'm a bit surprised your getting garbage on the display by running it slower than defined. But, just to make sure, why not change the DEFINE OSC 12 in your code to reflect the correct oscillator frequency? I'd certainly try that but as I said, I would not expect the results you're getting from lowering the oscillator frequency...

    /Henrik.

  5. #5
    Join Date
    May 2012
    Location
    Merseyside, UK
    Posts
    237


    Did you find this post helpful? Yes | No

    Default Re: 16f818 Fuses

    OSCCON = $70 ... I dropped the middle C

    Will play later... see where I get.

    TY Again

  6. #6
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,520


    Did you find this post helpful? Yes | No

    Default Re: 16f818 Fuses

    I meant the value $70, didn't even notice the missing C in OSCCON but never mind.

    /Henrik.

  7. #7
    Join Date
    May 2012
    Location
    Merseyside, UK
    Posts
    237


    Did you find this post helpful? Yes | No

    Default Re: 16f818 Fuses

    We had a play….IO is now working but …The display still corrupts when no xtal.

    Tried different display…..different processor but still missing bits !!!!

  8. #8
    Join Date
    May 2012
    Location
    Merseyside, UK
    Posts
    237


    Did you find this post helpful? Yes | No

    Default Re: 16f818 Fuses

    Strange things….

    To follow up….
    12Megs Xtal LCD is fine.
    8Megs Internal Clock… Garbaged LCD.
    Lowered to 4Megs Internal Clock LCD all fine

    Had a look at control lines for LCD with scope….. All fine and square with Xtal, Not so with 8Megs Internal Clock

    Lowered to 4Megs Internal clock, Control lines OK again.

    Running of a battery so not line pickup….Lots of 0.1uf caps close to key IC's.

    Interesting though…. ??

Similar Threads

  1. Interrupts and Sleep help 16f818
    By andybarrett1 in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 8th March 2015, 21:54
  2. 16f818 from 16f628a
    By andybarrett1 in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 27th August 2014, 07:31
  3. Interface for 16f818
    By davekav in forum Serial
    Replies: 4
    Last Post: - 17th April 2008, 11:33
  4. 3.3V not working with 16f818
    By jjohannson in forum General
    Replies: 3
    Last Post: - 8th March 2007, 20:53
  5. 16F818 ADCON question
    By peterdeco1 in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 1st February 2006, 10: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