Advice on migrating from 16F628A to 16F18344


+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Junior Member davroski's Avatar
    Join Date
    Mar 2019
    Posts
    4
    Thumbs Up
    Received: 0
    Given: 0
    Total Downloaded
    268.38 MB

    0 Not allowed!

    Default Advice on migrating from 16F628A to 16F18344

    I'm thinking of altering a design from 628A to 18344 and wonder if anyone has experience of using the 18344?
    I want to run it with the 32 MHz internal clock as opposed to the 4 MHz internal clock of the 628A.

    Couple of questions
    1. Compiler. is it as easy as changing to xtal = 32 in Proton (apart from altering the new config registers obv.) for the new speed for correct timing? (I'm programming the chips with ICSP not bootloader)

    2. Two PICS. I want to run Serin rx on one chip and Serout tx on the other. At 300 bps. Can the higher clock speed of the 18344 handle 300 bps?

    3. The receiver PIC needs incoming data to wake it from sleep - can this be done with the 18344? At present the 628A is waking up fast enough to catch the data that wakes it up.

    Thanks
    Dave

  2. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  3. #2
    Senior Member tumbleweed's Avatar
    Join Date
    May 2011
    Posts
    468
    Thumbs Up
    Received: 84
    Given: 0
    Total Downloaded
    330.54 MB

    0 Not allowed!

    Default Re: Advice on migrating from 16F628A to 16F18344

    I haven't actually used a 16F18344, but from looking at the datasheet...

    1. It appears that there's a 32MHz setting for the intosc using just the CONFIG bits, so that should be all you need.

    2. Yes, you can get 300 baud operation @ 32MHz using the 16-bit BRG.

    3. Since all the clocks are stopped in sleep mode I don't think you can't wake up using the uart unless you use the special
    Auto Wakeup On Break mode (WUE bit). This would require the first character to be all 0. Since the part has PPS you could always
    use that to assign the INT function to the same pin as the usart RX and wake it up that way, or use an IOC interrupt to do the same thing.

    I'm not sure how you're waking up the 628 now... that would have the same issue (but it's not as flexible)

  4. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  5. #3
    Junior Member davroski's Avatar
    Join Date
    Mar 2019
    Posts
    4
    Thumbs Up
    Received: 0
    Given: 0
    Total Downloaded
    268.38 MB

    0 Not allowed!

    Default Re: Advice on migrating from 16F628A to 16F18344

    Thanks for the reply.
    re 3. I'm sending rx data via one of the comparators, which don't go to sleep. They are configurable to generate an interrupt on change which wakes the PIC up. I'm using Serin as opposed to HSerin and the processor seems to wake up plenty fast enough to catch the start bit that woke it up. I'm hoping to pull off the same trick with the 18344 which I'm changing to cos I need the extra I/O pins and a higher clock puts clock interference out of the way in this application. Just need to check there's a Serin code for the baud rate with a 32 MHz clock

  6. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  7. #4
    Senior Member tumbleweed's Avatar
    Join Date
    May 2011
    Posts
    468
    Thumbs Up
    Received: 84
    Given: 0
    Total Downloaded
    330.54 MB

    0 Not allowed!

    Default Re: Advice on migrating from 16F628A to 16F18344

    Just need to check there's a Serin code for the baud rate with a 32 MHz clock
    According to the manual supposedly there is.

    The 16F18344 is a lot more flexible than the old chip. Instead of being stuck using a fixed comparator pin and software SERIN, you could always use the PPS function to assign both INT and usart RX to pretty much any pin you want (INTPPS and RXPPS registers).
    That way you could use a single pin to wake it up with INT and still use the hardware usart.

    The HFINTOSC should startup within 20-50us (depending on the sleep mode). You may have to watch out for the intosc tolerance as it can be up to 5% on that part depending on the voltage and temp range you're operating over, and 5% is usually considered too far out for reliable async serial use. You'd have the same issue using either method, but the hardware would allow for other things without messing with the serial receive timings.

  8. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  9. #5
    Junior Member davroski's Avatar
    Join Date
    Mar 2019
    Posts
    4
    Thumbs Up
    Received: 0
    Given: 0
    Total Downloaded
    268.38 MB

    0 Not allowed!

    Default Re: Advice on migrating from 16F628A to 16F18344

    Hi
    Thanks for the further comments. I hadn't noticed the PPS function - that's very useful.
    Re clock tolerance I've never noticed an async error with the 628A so hopefully it'll be ok - but it's certainly something to watch for. So far the 628A clock has been generally about 10 kHz low at 4 MHz or 0.25% (at room temp). I've seen figures of 3.75% stated as a max error for reliable async. Temperature range could be quite wide as this is an externally mounted unit potentially anywhere on the planet. I don't really want to use an external xtal as that's two ports gone (or one anyway as a minimum) but a dab of freezer spray and soldering iron torture will reveal the limits. Many thanks.

  10. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  11. #6
    Junior Member davroski's Avatar
    Join Date
    Mar 2019
    Posts
    4
    Thumbs Up
    Received: 0
    Given: 0
    Total Downloaded
    268.38 MB

    0 Not allowed!

    Default Re: Advice on migrating from 16F628A to 16F18344

    As an update I can confirm the internal clock runs fine at 32 MHz and 300 bps at room temperature, in my sample anyway, speed was as close to spot on as my digital scope could measure.

  12. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. Replies: 12
    Last Post: 24th January 2019, 09:07
  2. Migrating from 16F88 to 18F1320
    By picyerknows in forum Proton Plus Compiler v3
    Replies: 0
    Last Post: 17th April 2008, 14:00
  3. [SOLVED !] Probs migrating from 16F877A to 18F4550
    By Charles Coultas in forum Proton Plus Compiler v3
    Replies: 0
    Last Post: 12th February 2008, 15:05
  4. Migrating to 18F1320 need help!
    By Shax in forum Proton Plus Compiler v3
    Replies: 2
    Last Post: 10th June 2007, 16:53
  5. migrating from 16F877 to 18F4550
    By picyerknows in forum Proton Plus Compiler v3
    Replies: 0
    Last Post: 27th September 2006, 11:49

Members who have read this thread since 31st August 2019, 09:42 : 44

Actions :  (Set Date)  (Clear Date)

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