RB1 pin

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

Moderator: hvxl

RB1 pin

Postby edrelais » Sat Apr 07, 2018 3:10 pm

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
edrelais
Starting Member
Starting Member
 
Posts: 2
Joined: April 2018

Re: RB1 pin

Postby hvxl » Sun Apr 08, 2018 7:18 pm

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
hvxl
Senior Member
Senior Member
 
Posts: 1082
Joined: June 2010

Re: RB1 pin

Postby edrelais » Tue Apr 10, 2018 4:14 pm

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.
edrelais
Starting Member
Starting Member
 
Posts: 2
Joined: April 2018

Re: RB1 pin

Postby hvxl » Wed Apr 11, 2018 4:47 pm

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
hvxl
Senior Member
Senior Member
 
Posts: 1082
Joined: June 2010


Return to Opentherm Gateway Forum

Who is online

Users browsing this forum: No registered users and 1 guest

cron