OS and Tile with Spin Stamp
Newzed
Posts: 2,503
For Mike Green:
Good evening, Mike.
I just about have·my new·board for the Spin Stamp finished.· When they become available, I would like to run your OS plus Chip's Tile program - same thing I am doing now with the Prop.· Would I have to do anything other than change the keyboard pins in the CON block and VGA start pin in the program.· Spin Stamp has no EEPROM, but I would leave OS_loaderInit and OS_loader in as objects since they might perform some function I am not aware of.
Thanks
Sid
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Yesterday is history, tomorrow is a mystery, and today is a gift.
That is why they call it the present.
Don't have VGA?
Newzed@aol.com
·
Good evening, Mike.
I just about have·my new·board for the Spin Stamp finished.· When they become available, I would like to run your OS plus Chip's Tile program - same thing I am doing now with the Prop.· Would I have to do anything other than change the keyboard pins in the CON block and VGA start pin in the program.· Spin Stamp has no EEPROM, but I would leave OS_loaderInit and OS_loader in as objects since they might perform some function I am not aware of.
Thanks
Sid
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Yesterday is history, tomorrow is a mystery, and today is a gift.
That is why they call it the present.
Don't have VGA?
Newzed@aol.com
·
Comments
The OS_loader and OS_loaderInit are needed as things are written. They also can be used to access other I2C devices and EEPROMs on any pair of I/O pins.
Sid
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Yesterday is history, tomorrow is a mystery, and today is a gift.
That is why they call it the present.
Don't have VGA?
Newzed@aol.com
·
Sid
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Yesterday is history, tomorrow is a mystery, and today is a gift.
That is why they call it the present.
Don't have VGA?
Newzed@aol.com
·
· maxPinPairs = 16
· i2cBootSCL· = 28
· i2cBootSDA· = 29
I change maxPinPairs to 8 and leave the SCL/SCA pin assignment unchanged, even though there are no pins 28 and 29.
Same with OS-loaderInit?· ·i2cBootSCL· = 28·- leave unchanged.\
And with all of this, Spin Stamp will find the EEPROM, whether it is on 10-11, 12-13 or 14-15?
Sid
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Yesterday is history, tomorrow is a mystery, and today is a gift.
That is why they call it the present.
Don't have VGA?
Newzed@aol.com
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Parallax Forums - If you're ready to learn, we're ready to help.
In your case, assuming the device address is zero (A0-A2 are grounded), the address of the first byte of the EEPROM on pins 10-11 would be "10 << 18 + 0". The shift count of 18 positions the pin number properly since the I/O routines don't use the least significant bit (because the pin # is always even).
Post Edited (Mike Green) : 3/10/2007 3:52:44 PM GMT
the 5VDC ported to a 4-pos header, but I still have to find a place to port
out the 3VDC.
Sid
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Yesterday is history, tomorrow is a mystery, and today is a gift.
That is why they call it the present.
Don't have VGA?
Newzed@aol.com
·
PRI ReadByte(location) : contents
· ldr.readEEPROM(10 << 18 + location, @contents, 1)
PRI ReadWord(location)
· return ReadByte(location+1) << 8 | ReadByte(location)
····addr := ReadWord($F618)
··· WriteWord(addr, t1, t2, t3)······· ·'send all 3 words at once, or,
··· WriteWord(addr, t1)
······ addr := addr + 2
··· WriteWord(2, t2)
······ addr := addr + 2
··· WriteWord(4, t3)
······ addr := addr + 2
··· WriteWord($F618, addr)··· 'store current addr at end of EEPOM
PRI WriteByte(location,contents)
· ldr.writeEEPROM(10 << 18 + 0, @contents, 1)· 'Is 1 the no. of bytes written?
· waitcnt(clkfreq / 50 + cnt)········ ' Pause briefly (20ms) to allow write cycle to complete
PRI WriteWord(location,contents)
· WriteByte(location+1,contents >> 8)
· WriteByte(location,contents & $FF)
Sid
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Yesterday is history, tomorrow is a mystery, and today is a gift.
That is why they call it the present.
Don't have VGA?
Newzed@aol.com
·
Your routines (ReadByte, ReadWord, WriteByte, WriteWord) look mostly ok. WriteByte has a typo ("10 << 18 + 0"?). The "1" is the # of bytes to be written as you noted.
The stuff in-between ReadWord and WriteByte doesn't make much sense ("WriteWord(4,t3)"?). I'm sure you can straighten it out.