PIC12F1840 & serout2
+ Reply to Thread
Results 1 to 7 of 7
  1. #1
    Join Date
    Dec 2010
    Location
    Melbourne Australia
    Posts
    56

    Default PIC12F1840 & serout2

    Hi,
    Anyone used the PIC12F1840 with serout2? Any tricks to it? I can't get anything out.

    Regards,

    Troy

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

    Default Re: PIC12F1840 & serout2

    Can't say I've used that specific command with that specific part but apart from the usual stuff* I don't see why it shouldn't work.

    * Where the usual stuff would be:
    Correct oscillator configuration.
    Analog functions on pin(s) in question turned off.

    The 12F1840 does have an EUSART, use that instead - if you can.

    If you need further help post the code.

    /Henrik.

  3. #3
    Join Date
    May 2013
    Location
    australia
    Posts
    1,661

    Default Re: PIC12F1840 & serout2

    there may be a clue in the manual

    SEROUT2 is not supported on 12-bit core PIC MCUs due to RAM and stack constraints.
    '
    This is more entertaining than Free to Air TV

  4. #4
    Join Date
    Dec 2010
    Location
    Melbourne Australia
    Posts
    56

    Default Re: PIC12F1840 & serout2

    Damn, I can't believe I missed that. Thanks for the answer Richard. I only need a really slow baud rate so I might try the old serout. Failing that, it'll have to be the EUSART although my experience with the EUSART on the PIC18F14K50 is it chewed up a quite a bit of juice when enabled...

    Cheers,

    Troy

  5. #5
    Join Date
    Dec 2010
    Location
    Melbourne Australia
    Posts
    56

    Default Re: PIC12F1840 & serout2

    Ummm... now reading p10 of the datasheet "This family of devices contain an enhanced mid-range 8-bit CPU core". So, I'm guessing it's not 12 bit?

    Troy

  6. #6
    Join Date
    Dec 2010
    Location
    Melbourne Australia
    Posts
    56

    Default Re: PIC12F1840 & serout2

    Okay, the EUSART seems to work fine and doesn't appear to consume any noticable extra power for this chip so hardware serials comms it is.

    Troy

  7. #7
    Join Date
    Dec 2010
    Location
    Melbourne Australia
    Posts
    56

    Default Re: PIC12F1840 & serout2

    So, it's probably worth adding as a reference for anyone looking at using this particular processor (12F1840) with PBP that you can't send serial comms in any software mode - debug, serout or serout2. Well, you can probably send numeric characters and ascii codes (eg: carraige return and line feed) reliably, but alphabetic characters don't send correctly - that is, they get transmitted reliably (consistent) but there's an offset added to their value so they come through as gobbledygook.

    Troy

Similar Threads

  1. Replies: 2
    Last Post: - 4th February 2015, 17:06
  2. Replies: 5
    Last Post: - 17th May 2012, 10:14
  3. Replies: 8
    Last Post: - 11th July 2011, 20:20
  4. Comunication between 12F683 & 16F84A with serin2/serout2
    By kklim29 in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 29th April 2010, 18:16
  5. ICD & PBP && how to get it to work
    By archendekta in forum mel PIC BASIC Pro
    Replies: 26
    Last Post: - 24th March 2010, 01:56

Members who have read this thread : 16

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