Skip to contentSkip to conversation

Howto set DIO on MPC-5200 Lite

DISCUSSION Matthias Fechner 3 participants 6 messages Mar 19, 2007

lore
Share & tools
lore
#0 lore raw

Hi,

how can I set the DIO ports from a MPC-5200 Lite?

Best regards,
Matthias

Signature · 4 lines
"Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs, and the universe trying to
produce bigger and better idiots. So far, the universe is winning." --
Rich Cook
#1 lore raw
Quoted 9 lines · Matthias Fechner

Hi,

how can I set the DIO ports from a MPC-5200 Lite?

Best regards,
Matthias

What's the DIO port ?

Sylvain

#3 lore raw

Hi Pedro and Sylvain,

Quoted 1 line · Pedro Luis D. L.

Could you mean "GIO" ports?

I mean the digital IO ports ok or general IO ports.
What I want is to set a signal to high or low which should control a relais.

I thought I can use the pin Dxx for that on the board.

Best regards,
Matthias

Signature · 4 lines
"Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs, and the universe trying to
produce bigger and better idiots. So far, the universe is winning." --
Rich Cook
#4 lore raw

Matthias Fechner wrote on Mon, 19 Mar 2007 10:48:19

Quoted 6 lines

Hi Pedro and Sylvain,

Quoted 1 line · Pedro Luis D. L.

Could you mean "GIO" ports?

Quoted 7 lines

I mean the digital IO ports ok or general IO ports.
What I want is to set a signal to high or low which should control a relais.

I thought I can use the pin Dxx for that on the board.

Best regards,
Matthias

The digital IO ports in the MPC5200 Lite are called GPIO ports. You can use some pins in the PSC ports and some Timers as General Purpose IO ports. You need to define the behaviour of these ports in the Port Config register or the Timer registers.

Best,
Pedro L.

_________________________________________________________________
Acepta el reto MSN Premium: Protección para tus hijos en internet. Descárgalo y pruébalo 2 meses gratis. http://join.msn.com?XAPID=1697&DI=1055&HL=Footer_mailsenviados_proteccioninfantil

#5 lore raw
In reply to Matthias Fechner
Quoted 7 lines · Matthias Fechner

Hi Pedro and Sylvain,

Quoted 2 lines · Pedro Luis D. L.

Could you mean "GIO" ports?

Quoted 8 lines

I mean the digital IO ports ok or general IO ports.
What I want is to set a signal to high or low which should control a relais.

I thought I can use the pin Dxx for that on the board.

Best regards,
Matthias

Well, just lookup the schematics to which port the pin you want to control is connected, then look in the datasheet how to control the GPIO. You must make sure the port you want to control is in gpio mode in port_config register, then setup it as output and drive a value onto it ... There is nothing currently in place to do that easily from userspace ...

Sylvain