Help with Mods to HX512 card Driver wnd interface to Demo board (fixed)
Ron Sutcliffe
Posts: 420
I have just received a Hydra Extreme 512K , Demo board and micro Sdcard adapter this week, and have set it up so that I can use my·10" laptop running Tera Term (VT100 emulator) instead of a separate Keyboard and VDU. I am looking to use it as a general purpose rig for Emulation, Catalina and Forth.
I have kept the pins 31, 30 available for the standard Serial IO port and pins 0..4 for the SDcard.
Only the following pins have been changed.
· Xmm························· card Prop
·· 19······························ 26 ……….changed from Pin 30
··· 9································ 25………..changed from Pin 1
·· 10······························· 24 changed from Pin 0
I have changed the constants in the standard SPIN Driver to reflect the above changes. I have tested the card via the Spin API, I wrote my own tests and they worked just fine.
This morning I changed HX512KSRAM_ASM_DRV_010 to reflect these changes.
The driver initializes the card and waits in run mode, the 4 Leds are on, (at the top right of the board) and the read LED·is also·on, but I can’t write to the card.
I have made the following changes to the ASM Driver.
Sometimes I think its best just to start from scratch, at least then I know whats going on.· [noparse]:([/noparse]
What am I not understanding about this driver ??
BTW I did change(butcher) ·the Xmm Card so it’s interchangable with my own memory card and other stuff , but not recommened. See photo’s
·Ron
Post Edited (Ron Sutcliffe) : 10/18/2009 2:26:16 AM GMT
I have kept the pins 31, 30 available for the standard Serial IO port and pins 0..4 for the SDcard.
Only the following pins have been changed.
· Xmm························· card Prop
·· 19······························ 26 ……….changed from Pin 30
··· 9································ 25………..changed from Pin 1
·· 10······························· 24 changed from Pin 0
I have changed the constants in the standard SPIN Driver to reflect the above changes. I have tested the card via the Spin API, I wrote my own tests and they worked just fine.
This morning I changed HX512KSRAM_ASM_DRV_010 to reflect these changes.
The driver initializes the card and waits in run mode, the 4 Leds are on, (at the top right of the board) and the read LED·is also·on, but I can’t write to the card.
I have made the following changes to the ASM Driver.
CON SRAM_CTRL_0 = 24 ' NET_RX_CLK (expansion pin 10) SRAM_CTRL_1 = 25 ' NET_TX_DATA (expansion pin 9) SRAM_STROBE = 26 ' USB_RXD (Prop TX ----> USB_RXD Host) (expansion pin 19) These contants below are at the end of the Spin wrapper SRAM_DBUS_BIT_SHIFT = 16 SRAM_CTRL_BIT_SHIFT = 24 ‘ ?????????? SRAM_STROBE_BIT_SHIFT = 26 ‘ Also ??????? The Mask are at the end of ASM code Modified SRAM_CTRL_MASK long %0000_0011_0000_0000_0000_0000_0000_0000 SRAM_DBUS_MASK long %0000_0000_1111_1111_0000_0000_0000_0000 SRAM_STROBE_MASK long %0000_0100_0000_0000_0000_0000_0000_0000 SRAM_DBUS_CTRL_STROBE_MASK long %0000_0111_1111_1111_0000_0000_0000_0000 nSRAM_CTRL_MASK long %1111_1100_1111_1111_1111_1111_1111_1111 nSRAM_DBUS_MASK long %1111_1111_0000_0000_1111_1111_1111_1111 nSRAM_STROBE_MASK long %1111_1011_1111_1111_1111_1111_1111_1111 nSRAM_DBUS_CTRL_STROBE_MASK long %1111_1000_0000_0000_1111_1111_1111_1111 Orginal Masks SRAM_CTRL_MASK long %0000_0000_0000_0000_0000_0000_0000_0110 SRAM_DBUS_MASK long %0000_0000_1111_1111_0000_0000_0000_0000 SRAM_STROBE_MASK long %0100_0000_0000_0000_0000_0000_0000_0000 SRAM_DBUS_CTRL_STROBE_MASK long %0100_0000_1111_1111_0000_0000_0000_0110 nSRAM_CTRL_MASK long %1111_1111_1111_1111_1111_1111_1111_1001 nSRAM_DBUS_MASK long %1111_1111_0000_0000_1111_1111_1111_1111 nSRAM_STROBE_MASK long %1011_1111_1111_1111_1111_1111_1111_1111 nSRAM_DBUS_CTRL_STROBE_MASK long %1011_1111_0000_0000_1111_1111_1111_1001
Sometimes I think its best just to start from scratch, at least then I know whats going on.· [noparse]:([/noparse]
What am I not understanding about this driver ??
BTW I did change(butcher) ·the Xmm Card so it’s interchangable with my own memory card and other stuff , but not recommened. See photo’s
·Ron
Post Edited (Ron Sutcliffe) : 10/18/2009 2:26:16 AM GMT
Comments
If that doesn't get you going I'll have another look [noparse]:)[/noparse]
I will go back to it now.
Pleased to find you lurking. Big [noparse]:)[/noparse] [noparse]:)[/noparse]
Regards
Ron
Hmm, I think I would be better if I was to re-route Xmem Pins 9,10,19 from prop pins 24,25,26 to 5,6,7 respectively and change the Cons and Masks again. This would be easy to do and I would not have to add any extra code, something I want to avoid.
Would appreciate comments.
Regards
Ron
So effectively you just add some more data (4 longs) to the driver and you'd have to modify existing instructions. Or you could write your own driver like I did, you may learn something new [noparse]:)[/noparse]
But you're free to rewire your h/w. If that's easy to do without penalty re: other peripherals then go for it.
Now to write a new API Wrapper so that the HK512K can be configured for any pin group without having to modify the Pin masks.
Now to look at what heater is up to with CPM, Where to start ???