HC908 I/O ports

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

HC908 I/O ports

951 Views
OmarAI
Contributor I

Well, this time I have a question about I/O ports. I've been using a HC908JL3 and a HC908JB16 mcu for a while. I've noticed that the I/O ports section of both mcu's datasheets specify for the JB16 mcu that, for example, port D pins are open drain when configured as output, so you need a pull-up resistor to generate a logic 1, otherwise is Hi-z or 0 (as output). For the HC908JL3 port B is specified as an 8-bit port that shares its pins with the ADC but it doesn't say whether it's open drain or not (I've assumed it isn't). The next thing I did is test those pins. If you configure port B of the JL3 as output and put a logic 1 it puts VCC at its output. The same thing for the JB16 port D and it puts a Hi-Z state at its output (that's because it is open drain). My questions are:

 

-Why port B of the JL3 is able to put a VCC voltage at its pins? It has an internal and non software configurable pull-up resistor?

-If the datasheet doesn't specify that it is open-drain/collector when configured as ouptut, does that means that the port is able to switch between logic 1 (VCC) and logic 0 without using pull-up resistors?

 

I hope I explained myself clearly enough.

 

Thanks.

Labels (1)
0 Kudos
1 Reply

250 Views
bigmac
Specialist III

Hello Omar,

 

As a general rule the GP output configuration may be assumed to provide both high and low drive current, unless otherwise specifically stated within the datasheet. The provision of open drain outputs on certain pins, as with the 908JB16, is a rather special case.  Within the Electrical Specifications section of the datasheet, the source current specified for each pin will also provide an indication.

 

Of course, this assumes that any of the peripherals available at a pin remain disabled, otherwise the peripheral will dictate the mode of operation of the pin.

 

It is always possible to emulate an open drain configuration.  Set the pin output state low, and then control the output state using the DDR bit, with an input setting representing the high state.

 

Regards,

Mac

0 Kudos