Hi
Trying to Communicate between an STM32F411 ( i2C Master ) and a PIC12F1840 i2C Slave .
I2C has 3 working Devices when I add the PIC18F1840 Slave and try to Scan for devices
it Replies with an ACK and then it shorts the SCK to GND and nothing works after that .
In my PIC Program I only INIT I2c and Put the MCU in a loop .
.
.
.
I2C Slave Pic12F1840 ( NOT FIXED )
-
- Posts: 186
- http://meble-kuchenne.info.pl
- Joined: Thu Dec 03, 2020 7:23 pm
- Has thanked: 54 times
- Been thanked: 26 times
I2C Slave Pic12F1840 ( NOT FIXED )
Last edited by Alan_37 on Sun Jun 23, 2024 12:33 pm, edited 2 times in total.
-
- Valued Contributor
- Posts: 1628
- Joined: Wed Dec 09, 2020 9:37 pm
- Has thanked: 142 times
- Been thanked: 761 times
Re: I2C Slave ( Pic12F1840 )
I know this is for pic acting as slave - but see viewtopic.php?f=6&t=2598 - where we hit the same issue with connecting two AVR MCUs.
We got around by using the twi interrupt - and the pic maybe has something similar..
Martin
We got around by using the twi interrupt - and the pic maybe has something similar..
Martin
Re: I2C Slave ( Pic12F1840 )
A Two wire interrupt , I think would be a custom interrupt , I am using i2c Channel 1 but I don't know how that wouldmnfisher wrote: ↑Mon Jun 17, 2024 7:35 pmI know this is for pic acting as slave - but see viewtopic.php?f=6&t=2598 - where we hit the same issue with connecting two AVR MCUs.
We got around by using the twi interrupt - and the pic maybe has something similar..
Martin
work .
-
- Valued Contributor
- Posts: 1684
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 374 times
- Been thanked: 583 times
Re: I2C Slave Pic12F1840 ( NOT FIXED )
Hi
Following on from Martin above, I was messing with I2C slave a while back and can't remember offhand when / why, but I do recall that I used the SSP interrupt on a PIC (not every PIC has this feature). Can't really remember much more, or if I actually succeeded in doing what I wanted, but I do know that I had to use the SSP.
Regards
Following on from Martin above, I was messing with I2C slave a while back and can't remember offhand when / why, but I do recall that I used the SSP interrupt on a PIC (not every PIC has this feature). Can't really remember much more, or if I actually succeeded in doing what I wanted, but I do know that I had to use the SSP.
Regards
-
- Valued Contributor
- Posts: 1684
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 374 times
- Been thanked: 583 times
Re: I2C Slave Pic12F1840 ( NOT FIXED )
Hi
If you go to the "old" forum and search for I2C SSP you should find some information. Incidentally the old forum is a great source of help.
https://www.flowcode.co.uk/mmforums/sea ... ds=i2c+ssp
Regards
If you go to the "old" forum and search for I2C SSP you should find some information. Incidentally the old forum is a great source of help.
https://www.flowcode.co.uk/mmforums/sea ... ds=i2c+ssp
Regards