Sming - Open Source framework for high efficiency native ESP8266 development

User avatar
By Ceb
#71061 Hi,

I made an interface to connect PIC16F microchip to ESP8266.
It's work fine to write / read byte between ESP and PIC16F1509 but i have some interruptions with unknow source, if you are interrest by this project, plz share your entry to resolve this litle issue :
In my example application, reading 3 byte over i2c make 6 interrupts unknow on pic16F1509 side...
I would like to clean I2C slave protocol to maximize reliability in case of multi slave IC behind ESP master.

I use Sming framework for ESP8266 and MPLABX for pic16f1509.

Hope my example help
Last edited by Ceb on Sun Oct 22, 2017 2:59 pm, edited 2 times in total.
User avatar
By Ceb
#71062 When i read only 0xFF register (error protocol counter) on pic16f side, i have 2 interrupts more that i had handle fine in my interrupt subroutine.

ESP send one byte with [adress + W], one byte [offset register to read], Reset, one byte with [adress + R], then PIC16F reply with a byte [offset register value]. I only lost 2 interrupts that increment my error protocol counter :) The better is a zero value!

I didn't find much documentation about slave I2C so i based my implementation like the sensor BMP180 in sming framework.
I hope put together my pic16F and BMP180 on the same I2C bus...