[NTLK] For developers: a better way to use the internal serial slot signals.

Jake Bordens jake at allaboutjake.com
Thu Apr 2 17:25:43 EDT 2015


I think I've figured out the way that the internal port was intended to be used.

There a function in the ROM called TVotagerPlatform::SetSubsystemPower().  This allows you to configure what power supplies (5v, 12v, etc) are needed by a subsystem.  It takes a 8-bit bit mask, each bit turns on a specific power supply.

Basically, you can tell the VoyagerPlatform that "subsystem X requires these specific power supplies."  When you go to use one of those subsystems, the platform first enables the various signals.  One of the bits in this configuration is the SerPortSel pin.  Each serial port is a "subsystem" in this context.

So by calling SetSubSystemPower() you can say "Serial0 needs the internal port" or "Serial3 needs the internal port"  Then when you open one of those ports for use, it configures the serial port signals appropriately. This is why toggling the pins manually has to be done after the port is opened.  The default is "external".  When you open the serial port it configures the port for external use regardless of what the pin was set to before.

Full details here: http://retronewton.blogspot.com/2015/04/subsystem-power-configuration-for-fun.html

Long story short, anyone making any nifty thingies that connect to the internal serial slot can use this method to properly configure the SerPortSel pins, and NewtonOS will automatically select the internal slot at time-of-use.  A well designed internal peripheral will obey these signals and it will prevent conflict with devices connected up to the Newton Interconnect Port.

I'm building a little app that uses this method and I'll post it eventually.



More information about the NewtonTalk mailing list