MCF51QE128 PTJD and PTJDD register address

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

MCF51QE128 PTJD and PTJDD register address

523 Views
KN11
Contributor I

Hi,

What is the correct register address for port J (registers PTJD and PTJDD) in the MCF51QE128? The reference manual says it's 0xFFFF802E and 0xFFFF802F but I couldn't change the port pins state (o to 1) with that setting. After I changed the port register addresses to 0xFFFF801C and 0xFFFF801D (same as PTGD and PTGDD have) in the MCF51QE128.h file the pins started to work as they should. Why??

This started to annoy me and if somebody has some information about it I would be grateful.

Labels (1)
0 Kudos
3 Replies

384 Views
TomE
Specialist II

Do you mean you are writing to the Port G pin registers and can see the Port J pins react?

 

Or do you mean you can write to the Port G Data register and read back the same values, but can't when you do that with the Port J Data registers?

 

if the latter, you have programmed the Port J Data Direction register to all outputs, haven't you? Figure 6.1 shows that when a port is programmed as an input the Data Register reads the input pins and not the output register.

 

Tom

 

0 Kudos

384 Views
KN11
Contributor I

Thank you for your quick reply.

What I mean is that I am writing to Port J pins (PTJD_SET_DATA_REG(0xFF) and the port pins are all set as output. The pins did not change from 0 to 1 until I changed the PTJD and PTJDD register addresses to be the same as Port G register addresses are (0xFFFF801C and 1D). I got this idea from a software in which the MCF51QE128.h-file was modified like this.

 

The funny thing is that this morning the Port J pins didn't work so I changed the register addresses back to default values (0xFFFF802E and 2F) and they started to work. Those pins have never worked with the default values. Typical monday!?

0 Kudos

384 Views
TomE
Specialist II

> Typical monday!?

 

Sounds like "typical file dependencies being wrong and not recompiling everything when they should".

 

I recommend a full build at least daily to save you from these sort of things.

 

Tom

 

0 Kudos