- Problem Ports on H8S/2378 (Renesas)
- Posted by Oliver Hager on October 3rd, 2005
Hello,
I try to use (for example port 5) as an digital input.
After a reset the port should be an input. Is there
any register to get the ports working, like the 'Module
Stop Control Registers' for the peripheral modules?
Init:
P5.DDR = 0;
Reading:
helper = P5.DR.BYTE;
Thank you!
- Posted by Paul Carpenter on October 3rd, 2005
On Monday, in article
<43413009$0$11209$79720d31@newsreader.inode.at>
o.hager@gmx.at "Oliver Hager" wrote:
The hardware manual that describes the power down modeule registers
describes I/O ports retain values while in module stop.
It is always advisable to be sure that the modules you want to use
are powered up regardless of what the manual says the initial
values may be a silicon change may have a different state.
This looks like you are using HEW include files and an unknown
compiler. Beware those include files use int where they should
be using short, as depending on your compiler it is possible for
several H8/H8S compilers to force all int to be 32 bit which
messes up all the register includes in those files.
The hardware manual has a section on I/O Ports and tells you
what the registers do and also depends on the chip if you have
enables IRQ0 to IRQ3 or SIO2 as to whether the port pins function
as interupts or as special functions.
As some of these pins can be interupts, I would ensure you have
followed the section for port 5 to ensure the pins you want to read
are truely configured for I/O and not interupts or serial port.
Depending on which compiler you are using you may find my sig block
useful.
--
Paul Carpenter | paul@pcserviceselectronics.co.uk
<http://www.pcserviceselectronics.co.uk/> PC Services
<http://www.gnuh8.org.uk/> GNU H8 & mailing list info
<http://www.badweb.org.uk/> For those web sites you hate
- Posted by Oliver Hager on October 4th, 2005
Thanks Paul Carpenter!
Reading the hardware manual carefully is a
good way. They changed the function of the
Port Data Register from H8 (Tiny) to H8S core. The
right register for input is now "P1.PORT.BYTE".
I'm using HEW.
best regards
Oliver
"Paul Carpenter" <paul$@pcserviceselectronics.co.uk> schrieb im Newsbeitrag
news:20051003.1556.311898snz@pcserviceselectronics .co.uk...
- Posted by Paul Carpenter on October 4th, 2005
On Tuesday, in article
<43422421$0$11211$79720d31@newsreader.inode.at>
o.hager@gmx.at "Oliver Hager" wrote:
I think you have a conceptual problem, that is dependant on the board
layout (how the chip has been wired up on THAT board). The H8/Tiny has
very few external ports - hence the name Tiny, whilst the H8S and H8H
sries has lots of ports so there are many ports available depending
on how the processor is configured.
Is this an EVB you are using or a special designed board.
Which compiler? Several exist from IAR to GNU for support of Renesas
H8 (tiny/L/H/S/SX/SLP) series.
PS it is easier for most people to read if you reply AFTER the each bit you
are quoting and deleting parts that are no longer relevant.
--
Paul Carpenter | paul@pcserviceselectronics.co.uk
<http://www.pcserviceselectronics.co.uk/> PC Services
<http://www.gnuh8.org.uk/> GNU H8 & mailing list info
<http://www.badweb.org.uk/> For those web sites you hate