PDA

View Full Version : Suggestions for a 40 pin DIP PIC with two MSSP



Scampy
- 4th June 2015, 17:54
Guys,

If you have been following my recent posts you'll see that I've been playing with an i2c adapter that allows a 128 x 64 GLCD to be driven by sending instructions via the i2c bus. Lets just say things haven't gone well, and it appears that I've given up with that board and may of damaged the glcd as well.

Anyway I'm looking at alternatives for this project. I can get a 128 x 64 GLCD for my easypic5 board (direct lug in) for around £14. However these are not supported by the i2c adapter board due to using a different chipset, so I would have to use the traditional parallel method of connection, which causes me a problem because this requires additional pins compared to the 20 x 4 LCD I'm using and I'm short on spare pins.

So, moving on, I've seen a 2.8" TFT which is not much more expensive than the stock 128 x 64 mono GLCD and touchsceen for the easypic5. Whilst it's pin for pin compatible with the parallel header on the EasyPic5 board, I can't use that due to the issue mentioned above. But it also has an SPI interface, which would make life simpler on the pin count. But then I need a PIC that has 2 MSSP's so I can use the i2c bus for other items such as the DS1307 RTC chip.

Anyone know of an 18F device in a 40 pin package that has two MSSP's that can be configured independently for the two protocols.

HenrikOlsson
- 4th June 2015, 18:55
Although my last attempt at using the Microchip Product selector showed their data may not be correct in all cases I'd still like to point out that questions like this is easily answered by using it (and then verifying against the datasheet). Selecting 18F series, 40 pins, 2 SPI basically brings up two families. The 18F45J10 and the 18F46K22 and their respective smaller cousins.

/Henrik.

Scampy
- 4th June 2015, 19:38
I tried the microchip website, but it didn't return the 18F45J10 in the list. Have requested samples, and I'll be placing the order for the screen soon

Thanks Henrik

Dave
- 5th June 2015, 12:02
Scampy, Let me ask you a question if you don't mind. Why do you need 2 I2C buses? You cant use them at the same time? Just connect the I2C DS1307 RTC chip and the display that uses SPI on the same clock and data lines? It is doable you know..

Scampy
- 5th June 2015, 21:05
Confusion Dave, just confusion..

I took advice from a well known and respected forum where nearly each post advises the poster to ready the datasheet :)

I was looking at using a different display that use the SPI protocol, and it seems that the data and clock lines on a MSSP module are shared and the datasheet states that you have to run either / or. Hence the assumption that getting PIC with two independent MSSP's, one for the i2c and the other for the SPI was the logical way forward. That was before I was reminded that PBP SPI and i2c comms are software driven and thus I could use any other digital pins... it doesn't have ti be the hardware MSSP.

Dave
- 7th June 2015, 14:03
That's kind of what I was aiming at. How ever, SPI usually has an CE line to enable comm to the host. I was thinking along the lines of using the same DATA and Clock lines for both devices. With the CE disabled to the SPI device you would then communicate to the I2C device. I have done this in the past mixing SPI and I2C memory devices.