[TI-H] Re: PIXpander


[Prev][Next][Index][Thread]

[TI-H] Re: PIXpander



 

--- Stephan Effelsberg 
> wrote:
>
>I've started documenting Sami's code, it may help for future
implementations.
>It's not yet complete, but useful.
>
>http://www.dvz.fh-koeln.de/~b012414/xp_beta1.asm

Well, I have been doing work, and have determined that the problem is not
entirely with the code. The hardware is shoddy (really, it is), and Sami
decided to hook up the connections without doing a 5V->3.xV conversion which
is VERY bad. Without that conversion the card will not have any idea what is
being fed to it. I am working on a version of the device that addresses this
problem and a couple others. I figured out how to do an Err/Good LED set
using a single pin, 2 LEDs and 2 diodes of the standard type. And one could
use a 3->8 or 4->16 Demultiplexor with my new design off of the Partition
LEDpins to get the full 8 partitions I use (16k apiece) with the 3 remaining
LED pins... I can ready binary fairly easily, so I won't spend the buck on
the chip... it drains power. Also, because of the laxk of conversion, 2-4
newcomponents will have to be added or changed, pins re-arranged/etc. to
makethis thing work the way I want it to. I am also writing code from
scratch, and will post the PSX Card interface routines with documentation
anddocumented source once they are done. I exclusively use PORTB for the
interface, and it is setup much cleaner than Sami's interface (I
disassembledthe code too), allowing callbacks to grab new data bytes to
send,or to process data bytes recieved. 

The PORTB 4-7 interrupt is used to determine when the ACK pulse came in, and
sets a flag and returns. (The interrupt code is a simple 2 instruction macro
for use in your interrupt routine) The check for this flag isn't done until
the next byte is ready to send or recieve, giving more time for other things
to take place. Also, because the 4Mhz PIC runs at 1 Instruction/1 usec, and
the clock pulse is only 4 usec wide, and Sami uses a method that takes
almost10-fold the amount, I rewrote the send/recieve code into seperate
portions and optimized it so that it ran at 250Khz (4 usec pulses)... Pain
inthe ass... really. 

Unfortunately, because of this and me still optimizing other portions, the
entire PSX Card code (Write Block, Read Block, Interrupt, Write Byte, Read
Byte, Test Connection, Partition Utilities for 8 * 16k chunking of the Card)
is sitting at roughly 256 words, 1/8th of the PICs total Program Memory. The
good news is that it only uses around 6-7 PIC Registers, which is only
1/10thof that available on a 16F84. Buffering and what-not is really up to
the task of the programmer using the routines, and I will only give tips on
ideas, rather than writing that code for others. I hope to put out a version
that uses PORTA for applications that NEED PORTBs 8 bit I/O potential or
don't need the Partition selector utilities (No LEDs needed). I plan on
finishing what Sami apparently doesn't have time for (unfortunately) and
releasing all the stuff, including PIC Asm Source for free on my website
(also will be posted, as I am currently re-locating) with credits to the
original idea to Sami. 

Right now:
Hardware -------- 80% Finished
PSX Code --------- 95% Finished
TI Code 0% Finished
UI Code ----- 50% Finished
Building ------- 70% Finished

_____________________________________________________________
-------------------------------------------------
Matrix-Zed E-Mail (Should This Be Removed?)



Follow-Ups: