I2C Channel 2

Moderator: Benj

Post Reply
dz28
Posts: 60
Joined: Thu Aug 04, 2016 3:30 pm
Has thanked: 7 times
Been thanked: 9 times
Contact:

I2C Channel 2

Post by dz28 »

I am working with the PIC18F45Q10
I want to use I2C channel 2, but when I select it in the component properties window SDA and SCL show as unconnected.
Is there a trick to get this to work?

Thanks

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: I2C Channel 2

Post by medelec35 »

Just left click on where I have added rectangle boxes.
That should allow you then select a suitable pin.
Attachments
I2C Mapping ch 2.png
(8.77 KiB) Downloaded 837 times
Martin

dz28
Posts: 60
Joined: Thu Aug 04, 2016 3:30 pm
Has thanked: 7 times
Been thanked: 9 times
Contact:

Re: I2C Channel 2

Post by dz28 »

Thanks for the reply.
It seems that the Remap Pin selection boxes do not always show.
If I click around a bit between Software, Chl 1 and Chl2 they eventually show and are selectable.

I'll play with it some more and see if there are any other clues to the problem

Thanks,
Dave

dz28
Posts: 60
Joined: Thu Aug 04, 2016 3:30 pm
Has thanked: 7 times
Been thanked: 9 times
Contact:

Re: I2C Channel 2

Post by dz28 »

Martin,

I am trying to use the SSD1306 component on I2C Channel2 with the PIC18F45Q10.
Pins Mapped to SCL RD2 and SDA RD3.
The simulation is fine but when programmed to hardware the display does not work.
The SDA and SCL line remain High.
Didn't work in software mode either.
In another post a similar problem was reported with the PIC18F27K40 part hopefully it is a similar solution.
The display is good and functions fine on an Arduino uno board

Attached is the flowchart I am testing the display with.

Thanks,
Dave
Attachments
OLED.fcfx
(9.06 KiB) Downloaded 179 times

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: I2C Channel 2

Post by medelec35 »

Hi Dave,
That Update has been applied very recently to PIC18F45Q10.
Select Help, Check for Updates,
Select Download
Finally Select Exit then Reload (third from the left at top,next to Save)
If the update has not fixed the issue, then A bug notification will be required.
Martin

dz28
Posts: 60
Joined: Thu Aug 04, 2016 3:30 pm
Has thanked: 7 times
Been thanked: 9 times
Contact:

Re: I2C Channel 2

Post by dz28 »

Martin,

Updated PIC18F45Q10
Wired the display directly to Chl1 RC3 and RC4.
The display works in Software mode only.
Selecting Chl1 SDA and SCL line remain High.

Thanks,
Dave

dz28
Posts: 60
Joined: Thu Aug 04, 2016 3:30 pm
Has thanked: 7 times
Been thanked: 9 times
Contact:

Re: I2C Channel 2

Post by dz28 »

I give up on this one.....
How do I move this to the Bug Forum

Thanks,
Dave

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: I2C Channel 2

Post by medelec35 »

Hi Dave,
dz28 wrote:How do I move this to the Bug Forum
Hi Dave, I have moved topic to the bug section for you.
dz28 wrote:In another post a similar problem was reported with the PIC18F27K40 part hopefully it is a similar solution.

No its not the same.
I reported that post and issue turned out to be with remapping pins.
You can remap channel 1 & 2, whereas could not do that with PIC18F27K40.
Martin

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: I2C Channel 2

Post by medelec35 »

medelec35 wrote: That Update has been applied very recently to PIC18F45Q10
Thinking about it, that update is just the fix I did for the interrupts.
At that Time, Ben did know the I2C channels are not working.
Martin

dz28
Posts: 60
Joined: Thu Aug 04, 2016 3:30 pm
Has thanked: 7 times
Been thanked: 9 times
Contact:

Re: I2C Channel 2

Post by dz28 »

Any update on the non functioning I2C channels?
Sorry to push but I need to get this project moving.

Thanks,
Dave

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: I2C Channel 2

Post by Benj »

I've had a look now and found some subtle differences between the 45Q10 and the 25Q10 I was using as my basis. Though only on channel 1 of the I2C and SPI, channel 2 looked ok.

I've pushed the changes to the update system so please have a go and let us know how you get on.

dz28
Posts: 60
Joined: Thu Aug 04, 2016 3:30 pm
Has thanked: 7 times
Been thanked: 9 times
Contact:

Re: I2C Channel 2

Post by dz28 »

Ben,

Thanks for checking on this for me.
Definitely made progress.
Chl1 and Chl2 now work good in their default pin locations.
Last problem is that when I remap the pins from the default Chl2 (SDA-RB2 and SCL-RB1) to (SDA-RD3 and SCL-RD2) it does not work.

Thanks,
Dave

dz28
Posts: 60
Joined: Thu Aug 04, 2016 3:30 pm
Has thanked: 7 times
Been thanked: 9 times
Contact:

Re: I2C Channel 2

Post by dz28 »

Ben,

Chl2 can be remapped to other pins on PortB and things work fine.
Remapping to PortD is the problem

Thanks,
Dave

dz28
Posts: 60
Joined: Thu Aug 04, 2016 3:30 pm
Has thanked: 7 times
Been thanked: 9 times
Contact:

Re: I2C Channel 2

Post by dz28 »

Has there been any luck with this Remapping issue?

Thanks,
Dave

Post Reply