cancel
Showing results for 
Search instead for 
Did you mean: 

General Purpose Output on P4.6?

philip1
Associate II
Posted on November 25, 2004 at 12:04

General Purpose Output on P4.6?

3 REPLIES 3
philip1
Associate II
Posted on November 16, 2004 at 12:20

Hi Guys,

well I've shot myself in the foot again by designing a PCB to use P4.6 of an ST10F168 as an output pin to turn an LED on and off.

Of course now it is built I have remembered that this pin is driven by the CAN TX and cannot be overridden unless the CAN unit is disabled. Sadly this also disables the internal XRAM which I need for my program!!!! (ARghhhhhhhh)

Does anyone know if there is a way to fool the CAN bus interface to drive a constant logic low on it's output? or even a bit stream that is predominantly low so that I can light my LED without having to cut and strap the board. I know nothing about the CAN so please be patient!

Come on you CAN experts...

Thanks for any help

PhilipJ

tchristney
Associate II
Posted on November 22, 2004 at 15:29

I do not have experience with the ST10F168 but with the ST10F269 you can set the CAN1EN bit in the XPERCON register to zero to get the state that you desire, i.e. disabling the CAN peripheral, making P4.6 available as well as enabling access to the memory location that the CAN peripheral would be mapped to. Of course, we actually use the CAN peripherals so I have not tested this. 😉

philip1
Associate II
Posted on November 25, 2004 at 12:04

Thanks for the help , unfortunately if you switch of the CAN in the F168 you also switch off the internal 6k of RAM which I need.

My next project will use the F269 so hopefully all will be better 🙂

PhilipJ