Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

What are my options - Two uarts needed?

Status
Not open for further replies.

Spadez

New Member
Hi.

I am currently using a PIC16f628A. I now need two UARTs to connect both my MP3 module and my RFID module.

I have spare pins, so should I do software UART or simply buy a PIC with two hardware UARTS? Im coding this in assembly.

- James
 
Personnaly I would buy an 18F with 2 UARTS and program in C18.

You can probably get free samples of an 18F with 2 UARTS and download the latest MPLAB and C18 Free from Microchip.

Wilksey
 
Hi,

I cant program in C18 it must be ASM, but you feel a different pic with two uarts is easier?

Furthermore, is there a PIC which will suit replacing a PIC16f628. I have looked at a few 18F's but they all either have a huge number of pins which would be unnecessary, or are not in the DIP.
 
Last edited:
Well you can obviously program in ASM if you wish, bit different on the 18F's though to the 16F's, no direct pin replacement as the 628 is a 18 pin device isnt it?

If you are really tied to ASM and pin count then you have not got much choice than to use a soft uart.

I am not aware of any 16F's with 2 hardware UARTS.

Wilksey
 
Hi.

I have checked, there isnt any 16F with 2 UARTS. I can move to a 18F and understand the pins will be different (I haven't made my circuit board yet), but im having a hard time finding a suitable 18F in DIP which is suitable. Is there even such a thing?
 
This has two hardware uarts PIC16F1527
It's a PIC16F1527

Peripheral Features:
• 53 I/O Pins and 1 Input-only Pin:
- High current sink/source 25 mA/25 mA
- Individually programmable weak pull-ups
- Individually programmable interrupt-onchange (IOC) pins
• Timer0: 8-Bit Timer/Counter with 8-Bit
Programmable Prescaler
• Enhanced Timer1, 3, 5:
- 16-bit timer/counter with prescaler
- External Gate Input mode
- Low-power 32 kHz secondary oscillator
• Timer2, 4, 6, 8, 10: 8-Bit Timer/Counter with 8-Bit
Period Register, Prescaler and Postscaler
• Ten Capture/Compare/PWM (CCP) modules
- 16-bit Capture, 200 ns (max. resolution)
- 16-bit Compare, 200 ns (max. resolution)
- 10-bit PWM, 20 kHz @ 10 bits
(max. frequency)
• Two Master Synchronous Serial Ports (MSSP)
with SPI and I
2
CTM
with:
- 7-bit address masking
- SMBus/PMBus
TM
compatibility
- Byte NACKing
• Two Enhanced Universal Synchronous
Asynchronous Receiver Transmitters (EUSART):
- RS-232, RS-485 and LIN compatible
- Auto-Baud Detect
- Auto-wake-up on start
 
Last edited:
Hi be80be

That is a nice find, never knew they did a 16F with two USARTS, even EUSARTS! Auto baud, even better!! I will have a look at the price difference when designing my next dual USART project to see the difference between this one and an equivalent 18F.

I did notice that it is TQFP and the poster wants a DIP package, is that the only PIC16F that you know of with two USARTS?

Regards

Wilksey
 
lol typical!

Although, I did notice that there are a couple of "future products" which have 2 USARTS on the 16F range, but no package information.

I like the idea they have with the PIC24's with the PMP thing where you can select what pins do what function, I think thats a really neat idea!

PIC18F's dont seem to much more expensive than a 16F these days, and the 24F's and DSPIC33's have come down in price also!

Shame they dont do any 32's in DIP format, my wirewrap prototypes are like a jungle of wire!!
 
Shame they dont do any 32's in DIP format, my wirewrap prototypes are like a jungle of wire!!

Just by a pic32 experimenter board there cheap now The pic 32 take a pickit3 to program them It can be done whit a pickit2
but you can't auto detect the chip. And the first time you forget bye bye pic32 LOL
 
I use the ICD2, although I have an ICD3 it isn't out of the box yet! lol

I have a Explorer 16 with a PIC32 module, but I tend to build demo boards for specific applications and then keep them as a trophy lol, so thats why I use TQFP to DIL adaptor boards.

I didn't know a PK2 could fry a PIC32, what does it do to them?
 
It auto detects at 5 volts and that's the end of them LOL you set it manually to 3.3 volts your ok first pcb I made I programmed a pic 32 one time set the vdd to 3.3 all was fine changed code reprogrammed and forgot to set it to 3.3 volts
and smoke came off the chips LOL
 
I would suggest the PIC24FJ64GA002. It is only 32 pins and available in a DIL package. In surface mount, the pins aren't as close together as the ones on the PIC16F1527. Also, being able to connect the EUSART receive and transmit lines to any of the programmable pins makes it very easier to layout the boards.
 
The PIC18F25K22 is my idea of a super chip:
https://www.electro-tech-online.com/custompdfs/2011/01/41412D.pdf
This has two USARTS, is through-holes, has 28 pins, and is really feature packed. I am working with this presently on an early development board and the PICKit2. My compiler is the Proton Dev System. I'm happy with this so far. The -25- is the 5V version, so all my old resources still work with this. Check the data sheet to find which version(s) are 3V specific.
HTH
ken
 
Status
Not open for further replies.

Latest threads

Back
Top