Testing all 4 Ports on the New AP5

for bbc micro/electron hardware, peripherals & programming issues (NOT emulators!)
User avatar
daveejhitchins
Posts: 4201
Joined: Wed Jun 13, 2012 5:23 pm
Location: Newton Aycliffe, County Durham
Contact:

Re: Testing all 4 Ports on the New AP5

Post by daveejhitchins » Sat Mar 17, 2018 1:02 pm

hoglet wrote:Try running the test with this cable removed.
Sorry Dave, I missed this one, but did try without the cable in the end.

Dave H :D
Parts: UM6502CE, GAL22V10D, GAL16V8D, AS6C62256A, TC514400AZ, WD1772, R6522, TMS27C512, AT28C256
Products: ARA II, ABR, ATI, AP6, MGC, AP5 . . .
For a price list, contact me at: Retro Hardware AT dave ej hitchins DOT plus DOT com

User avatar
1024MAK
Posts: 7566
Joined: Mon Apr 18, 2011 4:46 pm
Location: Looking forward to summer in Somerset, UK...
Contact:

Re: Testing all 4 Ports on the New AP5

Post by 1024MAK » Sat Mar 17, 2018 1:41 pm

daveejhitchins wrote:Could I use one of the control pins to latch-out from Port B and Latch-in to Port A ?
Yes, I think there is (using one control pin to indicate new data and another control pin to receive thus signal), but as I don't use this mode very often, I'll have to go and eat the datasheet...

Mark
For a "Complete BBC Games Archive" visit www.bbcmicro.co.uk NOW!
BeebWiki‬ - for answers to many questions...

User avatar
CMcDougall
Posts: 6096
Joined: Wed Feb 02, 2005 3:13 pm
Location: Shadow in a Valley of Scotland
Contact:

Re: Testing all 4 Ports on the New AP5

Post by CMcDougall » Sat Mar 17, 2018 1:58 pm

Just playing my AP5, mine is CPLD version 93 with P.~?&FCD7
So Port 1 is on the right for 33p MMC MMFS, just done a *FORM 80 0 (per hog let test) all is well!
Port 2 is on left for UPURS, & plays unzipped .UEF tape images perfectly too!! :D
ImageImageImage

User avatar
hoglet
Posts: 7252
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol
Contact:

Re: Testing all 4 Ports on the New AP5

Post by hoglet » Sat Mar 17, 2018 3:24 pm

Dave,

If you are trying to write a loop back test (with a cable connecting ports A and B) then you just need to do the following:

To test Port A as an output and Port B as an input:

Code: Select all

?&FCB3=&FF: REM Set Port A as an output
?&FCB2=&00: REM Set Port B as an input
FOR X%=0 TO 255
?&FCB1=X%
Y%=?&FCB0
IF X%<>Y%:PRINT "A=>B: wrote ";X%;" read back ";Y%
NEXT
?&FCB3=&00: REM Set Port A as an input to be safe
To test Port B as an output and Port A as an input:

Code: Select all

?&FCB2=&FF: REM Set Port B as an output
?&FCB3=&00: REM Set Port A as an input
FOR X%=0 TO 255
?&FCB0=X%
Y%=?&FCB1
IF X%<>Y%:PRINT "B=>A: wrote ";X%;" read back ";Y%
NEXT
?&FCB2=&00: REM Set Port B as an input to be safe
Dave

User avatar
1024MAK
Posts: 7566
Joined: Mon Apr 18, 2011 4:46 pm
Location: Looking forward to summer in Somerset, UK...
Contact:

Re: Testing all 4 Ports on the New AP5

Post by 1024MAK » Sat Mar 17, 2018 3:51 pm

Yeah, generally speaking you should set up the port for input first, then set up the port being used for output. Then you lessen the chances of two active outputs fighting one another.

Mark
For a "Complete BBC Games Archive" visit www.bbcmicro.co.uk NOW!
BeebWiki‬ - for answers to many questions...

User avatar
daveejhitchins
Posts: 4201
Joined: Wed Jun 13, 2012 5:23 pm
Location: Newton Aycliffe, County Durham
Contact:

Re: Testing all 4 Ports on the New AP5

Post by daveejhitchins » Sat Mar 17, 2018 4:16 pm

hoglet wrote: If you are trying to write a loop back test (with a cable connecting ports A and B) then you just need to do the following:
Thanks Dave, that's effectively what I'm doing - in a more complicated way :roll: I set the Ports up every time I do a Write and Read - then do the comparison in a procedural call. I'll ensure I follow Mark's instructions re Set-output-up-first. Then just go with what I have and see how it goes over the number I have to test.

Dave: I remember Simon changing the FPGA code, in association with a minor issue you found. I've not re-programmed, as yet! Will this have any impact if not carried out? Jonathan made change in the AP6 ROM, serial code issue. That's now in all future ROMs.

The 1 MHz Bus is easy to test: Either the BeebSCSImini works or not :wink: Now I have the UserPort Code working I may try and write a small BASIC program to run under Hi BASIC on the DE0-Nano - at least that should be quick :D

Thank you all for sorting this - Problem/niggle - not sure what to call it? Anyway it seems, after all, it wasn't a problem - just lack of understanding.

Dave H :D
Parts: UM6502CE, GAL22V10D, GAL16V8D, AS6C62256A, TC514400AZ, WD1772, R6522, TMS27C512, AT28C256
Products: ARA II, ABR, ATI, AP6, MGC, AP5 . . .
For a price list, contact me at: Retro Hardware AT dave ej hitchins DOT plus DOT com

User avatar
hoglet
Posts: 7252
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol
Contact:

Re: Testing all 4 Ports on the New AP5

Post by hoglet » Sat Mar 17, 2018 4:23 pm

daveejhitchins wrote: Dave: I remember Simon changing the FPGA code, in association with a minor issue you found. I've not re-programmed, as yet! Will this have any impact if not carried out?
I don't think there will be any impact, as long as you are running AP5 CPLD version .94.

(It certainly won't affect the user port).

Dave

User avatar
daveejhitchins
Posts: 4201
Joined: Wed Jun 13, 2012 5:23 pm
Location: Newton Aycliffe, County Durham
Contact:

Re: Testing all 4 Ports on the New AP5

Post by daveejhitchins » Sat Mar 17, 2018 7:12 pm

hoglet wrote:I don't think there will be any impact, as long as you are running AP5 CPLD version .94.

(It certainly won't affect the user port).
Thanks, Dave . . .

Dave H :D
Parts: UM6502CE, GAL22V10D, GAL16V8D, AS6C62256A, TC514400AZ, WD1772, R6522, TMS27C512, AT28C256
Products: ARA II, ABR, ATI, AP6, MGC, AP5 . . .
For a price list, contact me at: Retro Hardware AT dave ej hitchins DOT plus DOT com

Post Reply