Using PICs as UARTs


Closed Thread
Results 1 to 10 of 10

Hybrid View

  1. #1
    Join Date
    Aug 2011
    Posts
    461

    Default Re: Using PICs as UARTs

    If you don't mind setting a unique ID in the UserID area when you initially program the chip (say 1 to 4 for example), then you could use this setting to identify which of the four uarts the chip is supposed to be and have the master use the General Call address feature of the I2C to assign a new address to the device at powerup. It could be as simple as sending a packet to the General Call address consisting of the ID number and the new address.

    No additional lines required.

  2. #2
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166

    Default Re: Using PICs as UARTs

    dhouston, Doensn't the pic have an A/D? With a couple of fixed 1% resistors you can have quite a few addresses...
    Dave Purola,
    N8NTA
    EN82fn

  3. #3
    Join Date
    Dec 2005
    Posts
    1,073

    Default Re: Using PICs as UARTs

    Quote Originally Posted by Dave View Post
    dhouston, Doensn't the pic have an A/D? With a couple of fixed 1% resistors you can have quite a few addresses...
    Dave - I had thought of that but I am using the hardware EUSART and the hardware I2C so the only free pin is the MCLR pin which is input only - no ADC.

    But, see my answers above - the availability of the ds30 Bootloader for the chips I'm planning to use solves my problem.

  4. #4
    Join Date
    Dec 2005
    Posts
    1,073

    Default Re: Using PICs as UARTs

    Quote Originally Posted by tumbleweed View Post
    If you don't mind setting a unique ID in the UserID area when you initially program the chip (say 1 to 4 for example), then you could use this setting to identify which of the four uarts the chip is supposed to be and have the master use the General Call address feature of the I2C to assign a new address to the device at powerup. It could be as simple as sending a packet to the General Call address consisting of the ID number and the new address.
    I guess I did not explain my concerns clearly.

    Microchip will preprogram chips when you order them. All four chips will be have identical firmware except for the I2C address which must relate to a physical port (S2-S5) which is, in turn, related to the physical location of each chip on the PCB.

    The logistics of keeping 4 separate chips separate and then assembling them to the correct PCB location is what scares me. On another board, I have two sets of two identical chips (2x12F1822, 2x16F1823), that ID themselves upon startup by the state of one input which is grounded for one socket and tied high for the other - and these are DIP chips with sockets so it's not as critical that they be assembled correctly. I was trying to find a way to extend that to handle four identical chips.

    However, the issue is now moot. The ds30 bootloader has been updated to support all three PICs I am using (12F1822, 16F1823, 12F1840) and it allows writing EEPROM so they can have the bootloader installed by Microchip and then be programmed over a serial link after assembly or even by the end user.

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