h8/3337 port 3 problem

hello, I know such a topic may sound a little out of date.... sorry...

I'm reworking an old H8/3337 based project, the processor is in mode 3 (single chip mode)..

the problem I have regards PORT 3 BIT 3, I can't switch it from output mode (P3DDR.3 = 1) to input (P3DDR.3 = 0)

according to the datasheet, this pin should act as a general purpose I/O pin in mode 3, if the corresponding bit is cleared in the DDR register, this should put the pin into hi-impedance state and the actual state of the pin should be read by reading the data register...

What happens to me is that the output never goes to hi-impedance, though the actual state of the pin can be read...

P3PCR (Pull-up control register) is OFF

The DDR register is a write only register, according to this restriction I never read it, I simply switch the bit 3 from output to input by just writing 0xFF to DDR first, then writing 0xF7

I have no idea about what's wrong, I write firmware since 30 years, I found no application note or errata corrige on this ancient controller....

any help please?

Reply to
la_panza
Loading thread data ...

Yes as long as you do NOT have host interface slave data bus mode enabled (SYSCR.HIE = 1 should be 0).

Suggests a mode fault or SYSCR problem.

It could just be possible you are looking at the wrong line. I have been caught by this before now and kicked myself (repeatedly).

That is my quick look thoughts.

--
Paul Carpenter          | paul@pcserviceselectronics.co.uk
    PC Services
              GNU H8 & mailing list info
             For those web sites you hate
Reply to
Paul Carpenter

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.