Page 1 of 1

PIC Assembler 16F872 I2C Overview

Posted: Sat Jul 17, 2021 6:34 pm
by EngineeringCal
Hi

Could somebody tell us the general idea here please?

We have read the datasheet section on it.

It sort of leaves out 'and do what with it?'.

Thanks!

We do have a RTC 'helper chip' mini board we can test our code with.

Re: PIC Assembler 16F872 I2C Overview

Posted: Sat Jul 17, 2021 11:31 pm
by dyarker
'and do what with it?'
Anything you want. Especially if you want to do something needing Pulse Width Modulation. (and the software you write/find fits in the memory space)

It is a general purpose 8-bit microcontroller with PWM, ADC and UART circuits built in.

PWM can be used for motor speed, lamp dimming, power supplies an almost endless list.

Cheers,

Re: PIC Assembler 16F872 I2C Overview

Posted: Sun Jul 18, 2021 8:16 am
by EngineeringCal
Thank you Dale

Whoops! We meant the module. Master Synchronous Serial Port (MSSP) module.

Here is the datasheet for the 16F872.MSSP module is section 9

http://ww1.microchip.com/downloads/en/d ... 30221c.pdf

What is the general idea for coding SPI and I2C?

Configure the registers would be a step we suppose.

Then what?

What is the plan of action of our code for this mini board helper chip I2C?

https://www.futurlec.com/mini-pcf8583.shtml

Thanks!

Re: PIC Assembler 16F872 I2C Overview

Posted: Sun Jul 18, 2021 11:31 pm
by dyarker
Link is to a more general microcontroller.

The follow questions are too big to get into.

Re: PIC Assembler 16F872 I2C Overview

Posted: Mon Jul 19, 2021 10:35 am
by EngineeringCal
Thank you Dale

We have been looking into it some more.

Section 9 in the 16F872 datasheet.

The SPI section is 3 or 4 pages.

The I2C section we quit counting at 10 pages.

So.It looks like SPI is for us.

We do have this SPI helper chip mini board on the way.

https://www.futurlec.com/Mini_74HC595.shtml

Evil plan is to write code and IT SHOULD light up 8 LED's.

Using SPI module and mini board and LED mini board.

We'll see.

Thanks!