Use serial.Perhaps I have the wrong forum.
I was looking for examples of Python and PIC C (CCS) code for both ends.
I understand the hardware. My first computer used an 8008 CPU with punched paper tape on a Teletype for ROM.
I read that Python does not use interrupts (correct me) so how does it know when something is coming, when it starts, and when it ends.
The Raspberry Pi does not do clock stretching with i2c, or does it?
Sample code is what I'm looking for.
What is the best method to use?
It should require less than 10 lines of code for each device.
Write a function on the PIC to send a byte serially from an I/O pin, or use a UART if your PIC has one.
Ensure that the voltage levels between your PIC and Pi are compatible. Use a level shifter if necessary.
Connect the PIC output to one of the Pi UART input pins. Connect a common ground between the two devices.
Use pyserial to open the Pi serial port and read bytes.
Invent or discover a protocol that allows you to send a bunch of arbitrary bytes whilst at the same time clearly indicating start and end conditions for each block.
I am surprised that serial communication remains a mystery to someone with such a long and illustrious career.
Statistics: Posted by ame — Fri May 09, 2025 3:14 am