Pin out research thread - comments

From DIY contraptions to sophisticated FreeEMS-specific designs! Plus general hardware development!
User avatar
jharvey
1N4001 - Signed up
Posts: 1607
Joined: Tue Jun 10, 2008 5:17 pm

Re: Pin out research thread - comments

Post by jharvey »

Alright, I'm a bit confused, plugged vs unplugged, what's plugged and then unplugged?

Some of this can make sense if your not driving pins, they can float to one specific value, then perhaps plugged means you put it in a bread board or some such circuit that has a tendency to pull it on way or the other, changing the readings. I'm not seeing the trees from the forest here.

I was thinking we may want to add a magic decoder ring to the tuner software. Something that can tell us the status of ports and such in a more human readable format. Perhaps something that list portA, pin 1 current status high, set to input, pin 2 status low set to output, ect.

A pile of hex isn't exactly light reading or easy to know what's going on with the IO. I'm reading up / studying the tuner soft, but I don't think I can make a successful attempt at making a decoder ring. Based on how quick sry_not4sale whipped up the hex decoder, I'd bet he can do this in a snap. Is that something that might interest you sry_not4sale?
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Pin out research thread - comments

Post by Fred »

Yeah, I already talked to him about a potential payload type with reading and control over all the basic IO control registers :-) It would be quite a lot of work in check boxs/gui and a bit at my end too, so there are other priorities. Its icing.

Yes, bread board and not bread board. Whats interesting are those mmc regs! that could mean quite a lot.

Fred.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Pin out research thread - comments

Post by Fred »

Nope, still no luck.

Please anyone that has some time, scour the manual trying to find out why those pull up registers might be enabled after reset. I'm lost and it's time for bed.

Fred.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
jharvey
1N4001 - Signed up
Posts: 1607
Joined: Tue Jun 10, 2008 5:17 pm

Re: Pin out research thread - comments

Post by jharvey »

So let me see if I'm understanding this right. Your measuring port A pins, as either high or low, then reading them via soft, and your not getting the same thing your multi meter is telling you. So you measure it has high, but the soft read claims low. Is that right? Or are you simply trying to figure out what the defaults are, and how the are set.
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Pin out research thread - comments

Post by Fred »

No, the register and reality agree nicely. All lights light up because it doesn't take saturation to do that. the outputs are at about 0.9v due to weak pull up. the one that is pulled up strongly is at about 4.5v and is the only one shown on the register.

The issue is...

That the pull up is enabled in the first place! It shouldn't be. The default reset value is 0 for the pull up register bit that controls that port. And yet it is set without me setting it, without anything really.

When the Serial monitor runs it's not set. I don't know why there is a diff, but there is one.

I cut down the first release of FreeEMS to do nothing and it behaved the same. I suspect that maybe the SM code resets something and we don't. Still, whatever it is shouldn't need resetting and I want to know why it does.

If you wanna help, look into the docs and try to find out why port S and port A would be pulled up out of reset.

Fred.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
davebmw
LQFP144 - On Top Of The Game
Posts: 331
Joined: Sun Jul 13, 2008 2:58 pm
Location: South Wales, UK

Re: Pin out research thread - comments

Post by davebmw »

I found some interesting bits of info around chapter 22 in the datasheet regarding default levels and the addresses that require setting to disable the pull-up devices on all the ports not just A and S.
Here are some highlights copied and pasted from the pdf.
This will probably make little sense without looking at the real datasheet.
Look here:

http://www.freescale.com/files/microcon ... P512V2.pdf


Most I/O pins can be configured by register bits to select data direction and drive strength, to enable and
select pull-up or pull-down devices. Interrupts can be enabled on specific pins resulting in status flags.

0x000C Pull-up Up Control Register (PUCR) Read / Write1 (covers port A I think)

0x024C Port S Pull Device Enable Register (PERS) Read / Write

22.3.2.27 Port S Pull Device Enable Register (PERS)

Read: Anytime.
Write: Anytime.
This register configures whether a pull-up or a pull-down device is activated, if the port is used as input or
as output in wired-OR (open drain) mode. This bit has no effect if the port is used as push-pull output. Out
of reset a pull-up device is enabled.

Figure 22-29. Port S Pull Device Enable Register (PERS)
Table 22-29. PERS Field Descriptions
Field Description
7–0
PERS[7:0]
Pull Device Enable Port S
0 Pull-up or pull-down device is disabled.
1 Either a pull-up or pull-down device is enabled

Hope it helps

Edit there are also registers to select the amount of drive the pins produce. :)
93'BMW 325is M50B25TU, Rebuilt 06/06, JE10.5:1, polish&port. Scorpion BB, K&N CAI, TEJ21 WBO2, '07 M3 Evo 18" 225F, 255R, EBC Kevlar, Bilstien Sprint, Polyflex. Head rebuild Oct'08, OEM+FSE FPR, MS2v3.0_DJB Custom, Extra 2.0.1
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Pin out research thread - comments

Post by Fred »

All true Dave, but if you look below the individual bits, it shows the default value out of reset, and it is zero for port A :-/ Hence I REALLY want to know why ours isn't as I'm not setting it and the cut down 0.0.1 code did the exact same thing!

Thanks for having a read though, I'm sure you found it interesting :-)

Fred.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
davebmw
LQFP144 - On Top Of The Game
Posts: 331
Joined: Sun Jul 13, 2008 2:58 pm
Location: South Wales, UK

Re: Pin out research thread - comments

Post by davebmw »

Still reading............
93'BMW 325is M50B25TU, Rebuilt 06/06, JE10.5:1, polish&port. Scorpion BB, K&N CAI, TEJ21 WBO2, '07 M3 Evo 18" 225F, 255R, EBC Kevlar, Bilstien Sprint, Polyflex. Head rebuild Oct'08, OEM+FSE FPR, MS2v3.0_DJB Custom, Extra 2.0.1
Post Reply