12F1840 config issues


Closed Thread
Results 1 to 14 of 14

Hybrid View

  1. #1
    Join Date
    Dec 2010
    Posts
    409


    Did you find this post helpful? Yes | No

    Default Re: 12F1840 config issues

    I guess SEROUT2 has changed for PBP3, because in PBP 2.6, the number 16468 is definitely wrong.
    Anyway, are you seeing any characters correctly? If so, you may need to put a pause between characters. I needed to do this with the 1840 talking to some devices.
    The clock may also be slightly off, causing some characters to get messed up.

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


    Did you find this post helpful? Yes | No

    Default Re: 12F1840 config issues

    According to the manual 16468 would be 9600, driven, inverted, no parity. Bit 15 is set which means driven, bit 14 says inverted, bit 13 says no parity. The rest of the bits says 84 which according to the formuala (1000000 / baud - 20) should result in 9600 baud.

    /Henrik.

  3. #3
    Join Date
    Jul 2003
    Location
    Lancashire
    Posts
    50


    Did you find this post helpful? Yes | No

    Default Re: 12F1840 config issues

    Yes 9600 inverted and the same line works correctly on other PIC types I have tried, its only with the 12F1840 it doesnt

  4. #4


    Did you find this post helpful? Yes | No

    Default Re: 12F1840 config issues

    if you cant check clock with frequency meter.......... add in loop once per second (on serout) increment or decrement osctune to see if characters come in view then try to figure about how far off and in what direction (raise/lower freq)
    amgen

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


    Did you find this post helpful? Yes | No

    Default Re: 12F1840 config issues

    Try Turning off the fail safe clock monitor, if I understand correctly it monitors an EXTERNAL clock. . .
    I would TRY altering bit 1 in OSCON just to see if it has any effect . . .

    I would add to config1
    _IESO_OFF ; Internal/External Switchover mode is disabled

    and I would disable WDT while troubleshooting at least once to judge if it has any effect.

    Oh yes, I would make a blinky program to test my configs without any serouts . . . a stopwatch using a blinky will give you a rough idea as to whether or not you are running at expected OSC speed.
    Last edited by Archangel; - 12th February 2015 at 22:15.
    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.

  6. #6
    Join Date
    Jul 2003
    Location
    Lancashire
    Posts
    50


    Did you find this post helpful? Yes | No

    Default Re: 12F1840 config issues

    Hi All

    I LED on the same pin configured to blink once per second, does just that so I am pretty sure some configs are right. I`ll try the last suggestions and see before I put in a support message. Many thanks for all the help! Cheers Pete

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


    Did you find this post helpful? Yes | No

    Default Re: 12F1840 config issues

    Hi Pete,
    Do you think trying to use timer 1 and trying to output serial data on T1 Clkin pin might be in conflict? I don't know, just sayin' . . . Have you tried using another pin, say RA1?
    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.

Similar Threads

  1. Problem converting 12F683 code to 12F1840
    By RossWaddell in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 14th March 2013, 02:55
  2. PBP Support for 12F1840 8-Pin Device?
    By springtank in forum mel PIC BASIC Pro
    Replies: 17
    Last Post: - 10th November 2012, 09:32
  3. Timer1 issues
    By mitchf14 in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 9th January 2009, 17:21
  4. 12c508a Device Config. And Burning Issues
    By sayzer in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 29th March 2006, 17:50

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