Re: SPI on the User Port ... Mode Hang-Ups.
- From: BruceMcF <agila61@xxxxxxxxxxxx>
- Date: Mon, 28 Jan 2008 13:30:57 -0800 (PST)
On Jan 28, 2:52 pm, Jim Brain <br...@xxxxxxxxxx> wrote:
BruceMcF wrote:
Actually, the data*** states data is valid on SP when the CLK falls,
so it is actually MODE 2. so you should be able to just invert the CLK
line and get MODE 0.
http://archive.6502.org/datasheets/mos_6526_cia.pdf(p 7)
You well need SS lines for each slave device you wish to talk to. Since
you won't talk to more than 1 at a time, I suggest a '138 to select 1 of
8 targets, using 0 as "idle". (G1 tied to Vcc, G2A to Bit3. G2B tied
to bit 4 of PortB). A second 138 can be used (G1 tied to Bit3, G2A tied
to GND, G2B tied to bit 4) for 16 targets, address 0 still being "idle".
Jim
A picture is worth a thousand words, but this is an ascii text
picture, so it only works in a fixed pitch font (courier, etc.)
The phase diagram from top to bottom: SEL, Clock0, Clock1, phase0,
phase1.
I'm typing this in Google groups, so I have to copy it from a fixed
pitch text editor.
\_________________________________/--
__/-\_/-\_/-\_/-\_/-\_/-\_/-\_/-\____
--\_/-\_/-\_/-\_/-\_/-\_/-\_/-\_/----
..=1=x=2=x=3=x=4=x=5=x=6=x=7=x=8=x=...
...x=1=x=2=x=3=x=4=x=5=x=6=x=7=x=8=...
CIA native is the second clock line (clock=1) and the second phase
line (phase=1) ... mode %11 = ... Mode3.
.
- Follow-Ups:
- Re: SPI on the User Port ... Mode Hang-Ups.
- From: Jim Brain
- Re: SPI on the User Port ... Mode Hang-Ups.
- References:
- SPI on the User Port ... Mode Hang-Ups.
- From: BruceMcF
- Re: SPI on the User Port ... Mode Hang-Ups.
- From: Jim Brain
- SPI on the User Port ... Mode Hang-Ups.
- Prev by Date: Re: SPI on the User Port ... Mode Hang-Ups.
- Next by Date: Re: C16 played Atari 2600?
- Previous by thread: Re: SPI on the User Port ... Mode Hang-Ups.
- Next by thread: Re: SPI on the User Port ... Mode Hang-Ups.
- Index(es):