[A83] Re: Distance RAM clearer :-)


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

[A83] Re: Distance RAM clearer :-)




>> >> >We could do some more useful things with this routine :-)
>> >> >
>> >> >Let's summarize:
>> >> >We have 2 input signals.
>> >> >So we have 2^2 = 4 bit simple input from the linkport
>> >>
>> >> red white
>> >> 1     0
>> >> 1     1
>> >> 0     1
>> >> 0     0
>> >>
>> >> >Plus 2 1-signal inputs = 6 signals
>> >>
>> >> How do you get that extra signals?
>> >
>> >R - Red
>> >W - White
>> >0 - Zilch/Nothing
>> >
>> >Tn - Timeindex n
>> >
>> >  T1 T2
>> >1 R  R
>> >2 R  W
>> >3 R  0
>> >4 W  R
>> >5 W  W
>> >6 W  0
>> >
>> >This is the way if the routine is triggered by R = high or W = high
>>
>> Ah. I get it.
>>
>> ><snip>
>> >
>> >> >now to find some use for that :-)
>> >> >Perhaps some base-6 Pin code :-)
>> >>
>> >> That needs timing and such, so you need extra hardware, right?
>> >
>> >Right :-)
>> >But, best thing would be if it was kept ASAP (As Simple As Possible)
>> >
>> >> >Or, some sensor-info, does someone know how to do short delays
>> >> >between two signals, such as [signal1 - short delay - signal2], when
>> >> >you press 1 button?
>> >> >A simple way, that is. (I already thought of using pulse-counters and
>> >> >pulse-generators, but it should be much simpler)
>> >>
>> >> That's possible, I think, with a clock-pulse routine, where the calc
>> reads
>> >> signals only when there's a clock pulse. This also needs extra
hardware,
>> but
>> >> it's less complicated I think, and the program can be endlessly
epanded.
>> >> Another possibility would be to use out(00),a to acknowledge input.
>> >
>> >I don't think the problem is with the calc, A.F.A.I.K if the signal is
sent
>> any time in the delay, it will be picked up.
>>
>> Yes, but you have to know the time between T1 and T2, and tune the
hardware
>> to it.
>
>Yes, but the time between reads can be longer than the time between sends,
and thus can the time between send's be fixed on the fastest (battery-high)
speed of the 83(+) cpu.
>
>>
>> In my version:
>>
>> signal:
>>
>>  1   0   1   1   0   0
>> ___     _______
>>    |   |       |
>>    |___|       |_______
>>
>>
>> clock:
>> ___     ___     ___
>>    |   |   |   |   |   |
>>    |___|   |___|   |___|
>>
>> (monospaced font, notepad for windows users, YAM / ed for amiga users,
emacs
>> for linux users)
>>
>> Now you have to read the signal at each change of the clock.
>> Oh. I was thinking of outputting data, ... well, this can also be used
for
>> inputting data.

[ADDITION]


bit1 =saferam1
bit2 =saferam1+1
bit3 =saferam1+2
bit4 =saferam1+3
bitzvar =saferam1+4
(...)
bit1loop:
 in a,(00)
 ld b,a
 cp 02h
 call z,bitz
 call nz,bitnz
 cp 00h
 call z,bitz
 call nz,bitnz
 ld a,bitzvar
 cp 00h
 jr z,bit1loop
 ld bit1,b
bit2loop:
 in a,(00)
 ld b,a
 cp 02h
 call z,bitz
 call nz,bitnz
 cp 00h
 call z,bitz
 call nz,bitnz
 ld a,bitzvar
 cp 00h
 jr z,bit2loop
 ld bit2,b
bit3loop:
 in a,(00)
 ld b,a
 cp 02h
 call z,bitz
 call nz,bitnz
 cp 00h
 call z,bitz
 call nz,bitnz
 ld a,bitzvar
 cp 00h
 jr z,bit3loop
 ld bit3,b
bit4loop:
 in a,(00)
 ld b,a
 cp 02h
 call z,bitz
 call nz,bitnz
 cp 00h
 call z,bitz
 call nz,bitnz
 ld a,bitzvar
 cp 00h
 jr z,bit4loop
 ld bit4,b
(...)
 ret

This should work. It's triggered if the clock line is high (the 02h line,
it's 00h if the other line is high too).

>Actually my idea was:
>
>            --------------------
>            |                  |
>Button n    |                  |       Red/White cable
>_/__________|                  --------|----------
>            |                          |
>            |  |--------------------|  |
>            ---|Something that put's|--|
>               |in a delay before   |
>               |relaying the signal.|
>               |--------------------|
>
>General picture. Again, use fixed-width font (emacs/notepad)
>
>My problem is making the delay-before-relay-thing.
>
>
>
>>
>> >(any corrections?)
>> >
>> >But, please elaborate you idea.
>>
>> I don't know what elaborate means, but I think I just did it.
>
>Right!
>
>>
>> >--Peter MArtijn
>>
>>
>>
>> >
>> >
>> >
>> >>
>> >> >--Peter Martijn Kuipers
>> >> >> Hi
>> >> >>
>> >> >> Nothing like this existed, and it is worthless, mostly, but it's
cool.
>> >> >>
>> >> >> begin:
>> >> >> in a,(00)
>> >> >> and 03h
>> >> >> cp 01h
>> >> >> jp z,C900    ;ram cleared
>> >> >> cp 02h
>> >> >> ret z
>> >> >> jp begin
>> >> >>
>> >> >> or on-calc (83+)
>> >> >>
>> >> >> DB00
>> >> >> E603
>> >> >> FE01
>> >> >> CA00C9
>> >> >> FE02
>> >> >> C8
>> >> >> C3959D    ; jump to 9D95, the .org value
>> >> >>
>> >> >> Now make a button and connect it to the white (middle) pin and the
>> earth,
>> >> >> and optionally an escape button to the red (top) pin and the earth.
>> >> >> I know, it's not as impressive as the PIXpander would be, or the
>> IRlink
>> >> or
>> >> >> however it's called, but it's still cool.
>> >> >>
>> >> >> Bye,
>> >> >>     Ronald
>>
>>
>>
>
>
>