I just tried the program as written and described without the hardware. Just printing.
Wow is it slow!  I get prints about 2 per second, with print subsituted for poke of DB.

I concur DB behaves as it should.
Something is definitely weird about that stutter. 
I'd put a scope prob on those data lines to try to see its behavior and try to   pin an
explanation to what is seen?

hint:
If the bits are both turning on and staying on but the motors misbehave, perhaps its
motor, (but that leaves us scratching our heads why both motor turn well in LOGO)
I don't know!


On 1/28/2017 10:11 PM, Dan Roganti via vcf-midatlantic wrote:
On Sat, Jan 28, 2017 at 8:58 PM, Dan Roganti <ragooman@gmail.com> wrote:


On Sat, Jan 28, 2017 at 8:49 PM, David Gesswein via vcf-midatlantic <
vcf-midatlantic@lists.vintagecomputerfederation.org> wrote:

On Sat, Jan 28, 2017 at 08:38:23PM -0500, Evan Koblentz via
vcf-midatlantic wrote:
1105 POKE L,DB: REM SEND DATA TO INTERFACE

I've been skimming so may not have followed all that has been done.

I would start with a print of DB here to see what it really being sent to
the
device. If they look fine I would try the pokes directly to try to
understand what pattern of pokes and bits set causes improper operation.


​yes, I had that in my version of the code too​
I display each of the variables on a formatted screen,
similiar to escape codes, by just using Tab's
to see each variable from each part of the code,
both the Main Code and each of the subroutines
the subroutines check out good
Dan



​I don't think I mentioned that I had the subroutines hard-coded while
debugging his problem
​So the math conversion is all removed, in Subs 1100 and Sub 1110, since we
only used 1 or 2 ports
We set preset DB to the correct value, each for Port 0 and Port 1

This time we tried it again, where DB=3, so both Port 0 and 1 switch On the
motors at same time.
But now both motors stutter, eg, toggle on/off repeatedly very quickly

Before only one of the motors would stutter when switching them On
separately,
using the separate joystick buttons
that happened on Port 0 with one program,
and the other motor would spin perfectly fine on Port 1.

Then we saw the opposite happen with a different program
So the problem moved to the other port with different programs, where each
are following a similar logic flow
The difference between the programs was one used Joystick buttons and the
other used keyboard commands

But now, this strangeness would only happen Ports 0,1 _pair_
And when we tried other pairs of output Ports, such as, port 0 and 5,
then -both- motors would stutter, switching them On separately
So there's really two strange problems, but I really think they are both
related to each other.
And from all of the debugging steps, I just can't pinpoint it yet

I saw Evan run this with Apple LOGO and it works =perfectly= in his video
using Joystick Buttons, one for each motor, they both turn On correctly,
and they never stutter.

So I find it very hard to think it's the 9750 Lego interface box -NOR-  the
6522 VIA Interface card in the slot
I'm finding it very suspicious there's a glitch in the Applesoft Basic
Interpreter,
But I'm still trying to debug this some more using Applesoft Basic

So I'm considering switching to Assembly on my end
I have a similar setup here too just like Evan, with the 9750 interface
box,
Just not interface card for the slot yet, so I have to get one wired
together.

Because the only common denominator between Applesoft Basic and Apple Logo
is machine code
Just so I can see if there is any definitive glitches with Applesoft Basic

but we may have another update very shortly
Dan