PIC Assembler 16F872 I2C Overview

Electronics Computer Programming Q&A
Post Reply
EngineeringCal
Posts: 8
Joined: Fri Jul 16, 2021 4:38 pm
Contact:

PIC Assembler 16F872 I2C Overview

Post by EngineeringCal » Sat Jul 17, 2021 6:34 pm

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.

dyarker
Posts: 1778
Joined: Fri Aug 22, 2003 1:01 am
Location: Izmir, Turkiye; from Rochester, NY
Contact:

Re: PIC Assembler 16F872 I2C Overview

Post by dyarker » Sat Jul 17, 2021 11:31 pm

'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,
Dale Y

EngineeringCal
Posts: 8
Joined: Fri Jul 16, 2021 4:38 pm
Contact:

Re: PIC Assembler 16F872 I2C Overview

Post by EngineeringCal » Sun Jul 18, 2021 8:16 am

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!

dyarker
Posts: 1778
Joined: Fri Aug 22, 2003 1:01 am
Location: Izmir, Turkiye; from Rochester, NY
Contact:

Re: PIC Assembler 16F872 I2C Overview

Post by dyarker » Sun Jul 18, 2021 11:31 pm

Link is to a more general microcontroller.

The follow questions are too big to get into.
Dale Y

EngineeringCal
Posts: 8
Joined: Fri Jul 16, 2021 4:38 pm
Contact:

Re: PIC Assembler 16F872 I2C Overview

Post by EngineeringCal » Mon Jul 19, 2021 10:35 am

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!

Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests