piclist 2003\01\30\064232a >
Thread: Pin won't turn off properly
www.piclist.com/techref/ubicom/devices.htm?key=sx
face picon face BY : Jinx email (remove spam text)

part 0 46 bytes
This is a multi-part message in MIME format.

part 1 3502 bytes content-type:text/plain; (decoded 7bit)

I've got a 50MHz SX18AC that's giving me the hump. Attached
are pics of the operation of the following SX code. The Scenix
waits for a handshake (r_ack) from a PIC and signals receipt of
r_ack by triggering a 74HC123 (set to 8us) with s_ack. The PIC
sees this 8us pulse and then carries on to other functions

The top frame is the first 1+ ms after the two micros are told to
start talking. The second frame is a magnification of the problem
area, and the third frame is how the sequence should be (and is
with the extra clrb)

The problem is that s_ack will not clear unless it is told to twice.
I've tried more NOPs, delays of ridiculous length (this is meant
to be a high speed transfer routine), but only an extra clrb will
do it. I've noticed this happen on another output pin that has
just a 10k pulldown connected, and it happens on other SX18s.

The circuit has been checked and checked but there's nothing
I can see that should make a_ack go low for just 1 cycle and
then go high again

Any ideas ?

Oh yes, another thing. The SX appears to take about 160ns (8 IC)
to respond to its r_ack pin going high (the yellow trace, frame 2,
sb r_ack = 2 IC) yet I'd have thought this is much too long before
s_ack goes high

;==================================================

        pulse   equ  ra.0     ;show activity
        r_ack   equ  ra.2     ;receive acknowledge
        s_ack   equ  ra.3     ;send acknowledge (via 74HC123)

;==================================================

        org $00

start    mov     ra,#%0000       ;initialise port lines
        mov     rb,#%00000000

        mode    $0c             ;PortB Schmitt Trigger on
        mov     !rb,#%00000000

        mode    $0d             ;PortB as TTL
        mov     !rb,#%11111111

        mode    $0e
        mov     !rb,#%00000000  ;PortB pull-ups on

        mode    $0f             ;Set Mode to Direction configuration

        mov    !ra,#%0100       ;ra.2 as "Data Ready" input

;                     0           74LS123 trigger
;                      1          data ready
;                       0         direction
;                        0        pulse

        mov    !rb,#%11111111   ;i/p to parallel load data

        mov     count,#250      ;init delay
pud      call    delay
        decsz   count
        jmp     pud
        jmp     pbon

;================================================
;        Approx 250us delay
;================================================

del250   mov     cu_hi,#-16

dloop15  mov     cu_lo,#-195

dloop25  incsz   cu_lo
        jmp     dloop25

        incsz   cu_hi
        jmp     dloop15

        ret

;================================================

;start-up synchronisation of PIC and SX
;PIC and SX are both stopped here

pbon     sb      r_ack         ;wait until push button starts PIC
        jmp     $-1           ;and it sends pulse

        setb    s_ack         ;send acknowledge
        nop
        nop
        clrb    s_ack

tend     setb    pulse      ;loop here
        call    del250
        clrb    pulse
        call    del250
        jmp     tend

;SX will not clear s_ack pin unless an extra clrb is used

        setb    s_ack         ;send acknowledge
        nop
        nop
        clrb    s_ack
        nop
        clrb






--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email spamlistservspamspammitvma.mit.edu with SET PICList DIGEST in the body




part 2 6700 bytes content-type:image/gif; (decode)


part 3 2 bytes
-
<00af01c2c854$a2adc360$46a8a7cb@joe>

See also: www.piclist.com/techref/ubicom/devices.htm?key=sx
Reply You must be a member of the piclist mailing list (not only a www.piclist.com member) to post to the piclist. This form requires JavaScript and a browser/email client that can handle form mailto: posts.
Subject (change) Pin won't turn off properly

month overview.

new search...