How can I modify port PCDR factory default value on Rabbit 6700?

Hi all!

On Rabbit 6700 pin PC4 from register PCDR has default value configured to high. This pin controls one relay, and his activation is critical for my design.

On my code I set up this value to low OUTPUT, but by the time Rabbit charges the program from FLASH, PC4 is high and it activates the relay, and this is not suitable for my application. Im trying to modify RabbitBIOS.c and StdBIOS.c to set up PC4 low by default, but i think im kinda lost.

Has anyone knows a possible solution? Im using Dynamic C 10.72

Thanks for the help,
John.

Without additional hardware the only option would be to use PC6 as PC0, PC2 and PC4 are set high on reset and the odd numbered pins are inputs.

You could add some additional logic to the output to either invert it and change the logic in your code or add some gating to keep it low until your code is running and can take control.

Regards,
peter

1 Like