Asynchronous baud rates on a 12F683 (serin / serout)


Closed Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2015
    Posts
    2

    Default Asynchronous baud rates on a 12F683 (serin / serout)

    Greetings all:

    Is there a maximum baud rate for serin/serout on the 12F683? I'm trying to port code from another device at T9600 and can't get the 12F683 to pic up the data on serin. I'm thinking maybe this chip is too slow?

    Thanks for any and all ideas . . .

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


    Did you find this post helpful? Yes | No

    Default Re: Asynchronous baud rates on a 12F683 (serin / serout)

    show us your code

    either include"modedefs.bas" or use mode 2 for t9600 driven as per manual 5.79.

    sometimes int_osc is too slow or inaccurate for "fast" serout. Be sure to DEFINE OSC xx so PBP knows what you are doing.
    Last edited by Archangel; - 14th September 2015 at 17:36.
    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.

  3. #3
    Join Date
    Sep 2015
    Posts
    2


    Did you find this post helpful? Yes | No

    Default Re: Asynchronous baud rates on a 12F683 (serin / serout)

    I've tried all kinds of different fuses and serin lines, here the latest . . .

    DEFINE osccon_1k 1 ' 4 ' 4mhz
    ANSEL = %00000000 ' all pins digital
    Include "modedefs.bas"
    osccon = %01100000
    B0 var byte
    B1 var byte
    b10 var byte
    main:
    SERIN 1, T9600, 10, main, [$65],b1,b0

    I've dropped the timout, dropped the qualifier, changes the fuse, all to no avail. My latest strategy is to try a 16F688.

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


    Did you find this post helpful? Yes | No

    Default Re: Asynchronous baud rates on a 12F683 (serin / serout)

    Ok,
    I see some "minor details"
    Var names must generally match B0 != b0

    You used 1 for the pin name, I don't use that as it confuses me, I use GPIO.1

    Defines must be caps, Define OSCCON_1K, define OSC 4 (notice I did NOT Capitalize the word define (no matter) but OSC IS CAPITALIZED.
    Code:
    DEFINE OSC 4
    DEFINE OSCCON_1k 1 ' 4 ' 4mhz
    ANSEL = %00000000 ' all pins digital
    Include "modedefs.bas"
    OSCCON = %01100000
    B0  var byte
    B1  var byte
    B10 var byte
    main:
    SERIN GPIO.1, T9600, 10, main, [$65],B1,B0
    End
    You might find the debug command is faster, and more compact than any of the other "software" serial commands.
    Last edited by Archangel; - 15th September 2015 at 01:41.
    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. 18F24J11 clock and HSER/HSER2 baud rates
    By kinburn in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 17th September 2010, 18:00
  2. 2 Pics, different baud rates needed
    By peter_wiersig in forum Serial
    Replies: 3
    Last Post: - 27th February 2010, 15:51
  3. HighSpeed A/D and Baud Rates
    By flyingasics in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 14th January 2010, 01:35
  4. DEBUG baud rates
    By btaylor in forum Serial
    Replies: 6
    Last Post: - 23rd January 2006, 12:00
  5. Faster baud rates with SEROUT commands
    By TurboLS in forum PBP Wish List
    Replies: 1
    Last Post: - 19th February 2005, 10:05

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