Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
As per the PICmicro™ Mid-Range MCU Family Reference Manual
Baud Rate Generator
In I2C master mode, the reload value for the BRG is located in the lower 7 bits of the SSPADD
register (Figure 17-18). When the BRG is loaded with this value, the BRG counts down to 0 and
stops until another reload has taken place. In I2C master mode, the BRG is reloaded automatically.
If Clock Arbitration is taking place for instance, the BRG will be reloaded when the SCL pin
is sampled high (Figure 17-19).
BRG stands for Baud Rate Generator and is not to be confused with SPBRG. The BRG is an internal circuit that is used to divide down the master oscillator to clock the I2C module. If you check the table of "Registers Associated with SPI Operation" you will see that BRG isn't one of them.
1.What I got from your reply is, The value load to ADDRES register depend on the SCL frequency in the I2C master configuration
2. could you please explain, what should be the value start count down in the picture my first post
This is I found from the Manual
To initiate a START condition the user sets the start condition enable bit, SEN (SSPCON2<0>).
If the SDA and SCL pins are sampled high, the baud rate generator is re-loaded with the contents
of SSPADD<6:0>, and starts its count. If SCL and SDA are both sampled high when the baud
rate generator times out (TBRG), the SDA pin is driven low. The action of the SDA being driven
low while SCL is high is the START condition, and causes the S bit (SSPSTAT<3>) to be set. Following
this, the baud rate generator is reloaded with the contents of SSPADD<6:0> and resumes
its count. When the baud rate generator times out (TBRG) the SEN bit (SSPCON2<0>) will be
automatically cleared by hardware, the baud rate generator is suspended leaving the SDA line
held low, and the START condition is complete.
Actually I need is to check hardware level signal transition
I am working with RTC DS1307 and PIC16f877a and reading time while updating to the LCD. Now it is working well.
So I need to debug and see how signals are communicating among the devices. I tried to do this using my own design PICkit2 + MPLAB( PICkit2 clone) but it did not success.
Could you please guide me what are the available low cost MICROCHIP product that I can purchase for hardware level debugger