Re: strange read with a 6502...

From: didier derny <didier_at_aida.org>
Date: Wed, 30 Mar 2016 21:44:02 +0200
Message-ID: <56FC2C82.8030504@aida.org>
if I remove the board and inject a signal on A0
I get the signals on other pins   a few mv
a little bit higher on CS

I checked with the oscilloscope

CS / PHI2  with the code odd/even seems ok   cs go low on falling edge 
of phi2  / go up on raising edge of phi2  (same for odd and even)

CS / A0     with the code odd/even    in both case A0 low for 2 periods 
of phi2

in both case A0 ils low for 2 periodes    (to access the data on the 
port  need A0=0)
odd: cs down during the first period
even: cs down during the second period

--
didier



On 30/03/2016 11:26, groepaz@gmx.net wrote:
> perhaps crosstalk between bit 0 of the address bus and some data line? did you
> gate the address with the clock?
>
> On Wednesday 30 March 2016, 11:20:26 didier derny <didier@aida.org> wrote:
>> not really specifically tested at other addresses but initially I found
>> that my code was working or not working
>> simply by editing the code, it was a long process to reduce the code to
>> 2 instructions
>>
>> I can try at several addresses
>>
>> in anycase the chip is always at the same address. it's decoded by a
>> 74LS138 + 74LS04
>>
>> as the ch376 is faster than the 6502 I was thinking that the data could
>> be removed from the bus
>> by the ch376 before the 6502 got them...
>>
>> but why do I find a difference when the code doing the read is placed at
>> odd or even addresses...
>>
>> the ch376 as 2 ports    DATA  and COMMAND/STATUS
>>
>> this code read the directory of usb key
>> if the read is at odd addreses I get the right directory content
>> if the read is at even addresses I get 00
>>
>> the commands works, reading the directory involves several commands all
>> working
>>
>> On 30/03/2016 10:37, A. Fachat wrote:
>>> Am 30. März 2016 10:15:24 schrieb didier derny <didier@aida.org>:
>>>> I have a problem with a read with a 6502
>>>>
>>>> I read a data on a register (from a CH376S)
>>>>
>>>> I have the following code:
>>>>                       *= 2000
>>>>
>>>> readdata      LDA    CH376data
>>>>
>>>>                        RTS
>>>>
>>>> this code always get  the wrong value
>>>>
>>>>                       *= 2001
>>>>
>>>> readdata     LDA    CH376data
>>>>
>>>>                        RTS
>>>>
>>>> now with this code I get the right value...
>>> That could be a broken address line to the IO chip or a timing issue
>>> in the address decode depending on the addresses.
>>>
>>> André
>>>
>>>        Message was sent through the cbm-hackers mailing list
>>         Message was sent through the cbm-hackers mailing list


       Message was sent through the cbm-hackers mailing list
Received on 2016-03-30 20:00:29

Archive generated by hypermail 2.2.0.