RB1 pin

This Forum is about the Opentherm gateway (OTGW) from Schelte

Moderator: hvxl

Post Reply
edrelais
Starting Member
Starting Member
Posts: 2
Joined: Sat Apr 07, 2018 3:56 pm

RB1 pin

Post by edrelais »

Hi Schelte,

I'm planning to design a PCB with the ability to program the pic in circuit on the pcb.
I've seen I have to remove the trace between RB1 and RA5, because of the 13v programming voltage, which pin RB1 doesn't like :)

Can you tell me the function of RB1 in the otgw? And why it's connected to RA5 and its pull up resistor and reset function?
Is it ok to leave RB1 floating, like RA2 and RB0? Maybe you know what will happen if I do so.

Is the trace a fault, or needed for something else? :)

Thanks in advance.

Edrelais
NL
hvxl
Senior Member
Senior Member
Posts: 1965
Joined: Sat Jun 05, 2010 11:59 am
Contact:

Re: RB1 pin

Post by hvxl »

To enter self-programming mode, the PIC needs to be reset. Unfortunately the used PIC16F88 doesn't have a software reset command. For this reason I hooked up an I/O pin to the reset pin. Under normal circumstances, the I/O pin is configured as an input (high impedance). When the firmware needs to reset the PIC, it sets the pin's output buffer to 0 and then changes the pin to an output. That pulls the reset pin low, resulting in a hardware reset.

However, the initial run of boards did not have the connection between RB1 and RA5. If you look carefully at the picture at the bottom of the design page, you'll find the trace is not there. So just to be sure, after pulling RB1 low, the code also jumps to the reset vector. This means that you will still get a simulated reset if you omit that connection. Leaving RB1 floating should not cause any problems.
Schelte
edrelais
Starting Member
Starting Member
Posts: 2
Joined: Sat Apr 07, 2018 3:56 pm

Re: RB1 pin

Post by edrelais »

Thanks for your explanation :)

If I understand it right;
- If I omit the trace, it isn't possible to do a firmware update by the otmonitor software anymore.
- Normal situation: RB1 is an input, pulled high by R10; If pulled low (by JP1 for example), a simulated reset will occur (the software goes to the startup run)
- Firmware reset (when firmware upload by otmonitor): RB1 is changed to an output and 0, which will pull the MCLR pin low.
hvxl
Senior Member
Senior Member
Posts: 1965
Joined: Sat Jun 05, 2010 11:59 am
Contact:

Re: RB1 pin

Post by hvxl »

edrelais wrote:- If I omit the trace, it isn't possible to do a firmware update by the otmonitor software anymore.
Incorrect. A firmware upgrade is still possible. It will just use a simulated reset rather than a hardware reset.
edrelais wrote:- Normal situation: RB1 is an input, pulled high by R10; If pulled low (by JP1 for example), a simulated reset will occur (the software goes to the startup run)
Incorrect. RB1 is an input to avoid high currents when pulling MCLR low by JP1. But pulling MCLR low will still cause a hardware reset. The connection to RB1 doesn't change that.
edrelais wrote:- Firmware reset (when firmware upload by otmonitor): RB1 is changed to an output and 0, which will pull the MCLR pin low.
Correct.
Schelte
Post Reply

Return to “Opentherm Gateway Forum”