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.

multiple connections to same port

Status
Not open for further replies.

jerryf

New Member
USING A PICF18F4550 can i interface to multiple rs232 or SPI or IC2 or is it just 1 connection to each?
I need to have a rs232 input, rs232 output to a LCD. a connection to a RTC, and a connection to external flash to store data

Thanks Jerry
 
FROM the DATASHEET:

Code:
19.1 Master SSP (MSSP) Module
Overview
The Master Synchronous Serial Port (MSSP) module is
a serial interface, useful for communicating with other
peripheral or microcontroller devices. These peripheral
devices may be serial EEPROMs, shift registers,
display drivers, A/D converters, etc. The MSSP module
can operate in one of two modes:
• Serial Peripheral Interface (SPI)
• Inter-Integrated Circuit (I2C™)
- Full Master mode
- Slave mode (with general address call)
The I2C interface supports the following modes in
hardware:
• Master mode
• Multi-Master mode
• Slave mode

You can pick one either I2C OR SPI & 1 USART

So you have 2 combos there

SPI and USART
or
I2C and USART

SPI can have multiple devices as well as i2c. USART is best as 1 device.

so you can have

1+ SPI devices and 1 usart
or
1+ I2C devices and 1 USART

EDIT:

I said from the datasheet because some devices have 2 spi and i2c so you can use both.
 
Last edited:
So I can use 1 uart
and 2 spi
so I will be short
do you know of a PIX18 that would give me more connections.
Is there any multiplexing here?
Thanks Jerry
 
Thats hardware remember you can always emulate aka bitbang SPI/I2C and have both 1 hardware and 1 software.

If you still want it hardware aka built in. Then i suggest you go here:

**broken link removed**

and scroll down until you see "MSSP (SPI/I2C)" and select 2
 
Last edited:
I went to that selection board and was totally lost..It insisted I fill out more info
To get the 2 SPI is that bitbanging
Thanks
 
no lol once you select the 2 MSSP then you click on DETAIL on the top

select-png.24093


Step 1. Select MSSP (2)
select2-png.24094

Step 2. Click Search Link On TOP
Step 3. Click Detail Link On TOP


It is a very useful tool. I use it all the time. You should also select other properties of the PIC to narrow down the list but as long as you select 1 thing on the list and follow those steps you will be set! :D enjoy and if you need anything else please ASK.
 

Attachments

  • select.png
    select.png
    3.4 KB · Views: 576
  • select2.png
    select2.png
    1 KB · Views: 660
Last edited:
Well the PIC18F45J10 operated at 3V, I just bought the JUNEBUG that requires 5 Volts
I got 1 foward and 2 backwards
Thanks Jerry
 
Check the datasheet. If the 18F45J10 has 5V tolerant inputs and you're powering it from it's own 3.3v supply the Junebug can program it.
 
Thats Good News

I'd better slow down.
I have to learn how to read a spec..It says I have UART, SPI, I2C But I can't use each for different purpose.
I have to look for Master SSP (MSSP) Module to further refine what I have.
I wanted to stay with 40 pin dip
Thanks Jerry
 
To review
I want to
get input on RS232
read rtc
write and Flash Memory Mini Board
display 2 lines of 24 characters on a lcd
Any suggestions on how to proceed.
Thanks Jerry
 
Can I use some chip to select what device I want to connect to?
ad tie the same tx and rx from the mpu to chip each to pss thru
Thanks Jerry
 
I would suggest that you choose I²C as this is designed for connecting ICs together (I²C = IIC = inter integrated circuit). You can connect your memory chips, RTC and any other devices you may need to this one bus and use the UART to communicate with whatever else you require (PC I assume). The LCD can connect to any port and only needs 7 I/O pins (can be 6).

Mike.
 
I²C Connections

Mike
How do connect the devices to use the 1 I²C
I hope to use the PIC18F4550
I'm glad to know I dont have to worry about the lcd connection.
As i understand what they told me I only have 1 (one) I²C port on that chip
I want to get the current time from a RTC , and read and write to external flash memory...how do I connect them
Thanks Jerry
 
You connect all I²C devices to the same bus and each device has it's own address. The address of I²C devices is set internally and you send the address of the device you want to read/write to. That's the beauty of I²C, you only have two wires connecting lots of devices together. You will be restricted on the amount of memory you can connect, the limit is 4Mb (bit) but can be increased with CS lines.

Mike.
 
Last edited:
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top