ICE T65/Z80/6809

discussion of games, software, hardware & emulators relating to the Acorn Atom
User avatar
hoglet
Posts: 6391
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol

Re: ICE T65/Z80/6809

Postby hoglet » Thu Jul 27, 2017 8:48 pm

Does the "Done" LED come on? This indicates the FPGA configuration has been successful.

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

Re: ICE T65/Z80/6809

Postby hoglet » Thu Jul 27, 2017 8:56 pm

sirmorris wrote:Should I be seeing the serial output through the built-in usb/serial converter or do I have to hook up to other pins on the device?

Yes, you should be seeing serial output via the FTDI USB UART on the Core board.

There are also Rx and Tx LEDs (LD10 and LD11) connected to this UART. Do they do anything?

Dave

User avatar
sirmorris
Posts: 702
Joined: Wed Feb 11, 2009 12:18 pm
Location: oxfordshire uk
Contact:

Re: ICE T65/Z80/6809

Postby sirmorris » Thu Jul 27, 2017 9:02 pm

Yes that's working fine, the 8 blue leds come on momentarily then the green done led lights.

There is the briefest of flash in TX, and when I send data the RX led reacts. I wondered earlier if it's the ftdi doing this though.

User avatar
sirmorris
Posts: 702
Joined: Wed Feb 11, 2009 12:18 pm
Location: oxfordshire uk
Contact:

Re: ICE T65/Z80/6809

Postby sirmorris » Thu Jul 27, 2017 9:08 pm

Right, your build is flashed and rather reassuringly - for me at least - it behaves exactly the same as mine.

Is there anything I need to configure on the board itself Jason? Or did yours work just as-is?

User avatar
flynnjs
Posts: 738
Joined: Tue Jul 06, 2010 9:33 pm

Re: ICE T65/Z80/6809

Postby flynnjs » Thu Jul 27, 2017 9:08 pm

Two things spring to mind:
1) The FTDI is a clone and the Windows driver has nuked it.
2) What is the idle polarity of the TX and RX ? You may need to use FT_PROG to invert the sense.

I don't remember playing with the DCM, but I've been asleep since Jan '16 !

User avatar
flynnjs
Posts: 738
Joined: Tue Jul 06, 2010 9:33 pm

Re: ICE T65/Z80/6809

Postby flynnjs » Thu Jul 27, 2017 9:14 pm

Aha, I did tweak the DCM....
DCM0.zip
(788 Bytes) Downloaded 11 times

User avatar
sirmorris
Posts: 702
Joined: Wed Feb 11, 2009 12:18 pm
Location: oxfordshire uk
Contact:

Re: ICE T65/Z80/6809

Postby sirmorris » Thu Jul 27, 2017 9:21 pm

I've tried FT_PROG and inverted various things but no change. Tellingly the TX light only flashes when the FPGA boots, not when I press buttons. Perhaps the DCM is the answer ;)

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

Re: ICE T65/Z80/6809

Postby hoglet » Thu Jul 27, 2017 9:29 pm

flynnjs wrote:Aha, I did tweak the DCM....
DCM0.zip

I guess it's just possible that is the issue, but I would be really surprised.

The difference is 16.000MHz vs 16.129MHz = 0.8%

A UART should be work fine until the clock is ~4% out.

Charlie, can you scope the TxD signal and see if anything is being sent when SW2 is pressed/released? The best way to do that would be to temporarly change board.ucf and change avr_TxD from P46 to something more accessible, e.g. P67 which is J4 pin 40. Then "make clobber build" and reprogram.

Edit: Also, the software needs to know the frequency of the AVR Core, for the baud rate calculation:
https://github.com/hoglet67/AtomBusMon/ ... le.inc#L13

Dave
Last edited by hoglet on Thu Jul 27, 2017 10:00 pm, edited 4 times in total.

User avatar
sirmorris
Posts: 702
Joined: Wed Feb 11, 2009 12:18 pm
Location: oxfordshire uk
Contact:

Re: ICE T65/Z80/6809

Postby sirmorris » Thu Jul 27, 2017 9:31 pm

I will happily do this, alas my time for fun
has run
out and I will be afk
for at least a day.
Thanks for all the work you've put in today chaps - I really appreciate it.
I'll update you soon as.

User avatar
Elminster
Posts: 1632
Joined: Wed Jun 20, 2012 8:09 am
Location: Essex, UK

Re: ICE T65/Z80/6809

Postby Elminster » Fri Jul 28, 2017 2:09 pm

Started a ramblethon topic on what I needed the ICE-T for as per Dave's request.

viewtopic.php?f=44&t=13504

User avatar
sirmorris
Posts: 702
Joined: Wed Feb 11, 2009 12:18 pm
Location: oxfordshire uk
Contact:

Re: ICE T65/Z80/6809

Postby sirmorris » Sat Jul 29, 2017 6:41 am

OK, for the record - I made the TX pin change and rebuilt, reprogrammed and all I see is the pin making a high->low transition and staying there after a reset. Not a peep from the buttons, no activity whatsoever. PM sent.

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

Re: ICE T65/Z80/6809

Postby hoglet » Sat Jul 29, 2017 6:52 am

sirmorris wrote:OK, for the record - I made the TX pin change and rebuilt, reprogrammed and all I see is the pin making a high->low transition and staying there after a reset. Not a peep from the buttons, no activity whatsoever. PM sent.

Very strange indeed.

Can you verify the 50MHz oscillator is indeed oscillating?

Are you using the .mcs file (EEPROM) or the .bit file (RAM) in the lx9_jason/icez80 directory? Either should be OK.

(Note, the .bit file in the working/ sub-directory will not work as it contains no AVR firmware).

What I can do this morning is to add a bit of test code to the design
- to flash an LED in hardware (using the 50MHz clock divided down)
- to mirror the button state on the LEDs

We should also tweak the clock DCM (as Jason did) but I don't think that is the issue.

Was there any kind of a test design in the board when you received it? I'm really hoping this isn't a dead board...

Dave

User avatar
sirmorris
Posts: 702
Joined: Wed Feb 11, 2009 12:18 pm
Location: oxfordshire uk
Contact:

Re: ICE T65/Z80/6809

Postby sirmorris » Sat Jul 29, 2017 7:25 am

There was indeed a test program, it faded the LEDs in a pattern. I think the board is essentially OK. I'll try and scope the clock lines later.

User avatar
flynnjs
Posts: 738
Joined: Tue Jul 06, 2010 9:33 pm

Re: ICE T65/Z80/6809

Postby flynnjs » Sat Jul 29, 2017 9:00 am

When I get back to my PC I'll post the 6502 bit file to try. Remember not to test this with it strapped as z80 or you might cause damage.

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

Re: ICE T65/Z80/6809

Postby hoglet » Sat Jul 29, 2017 9:45 am

Charlie,

Here's a test build to try to verify some basic things are correct...
icez80_test1.zip
(343.68 KiB) Downloaded 7 times

The only changes I've made are:
1. Connect inverse of SW1 through to LD1
2. Connect inverse of SW2 through to LD2
3. Connect a registered version of inverse of SW2 (clocked off clock_avr) through to LD4
4. Connect a registered version of inverse of SW2 (clocked off clock_49) through to LD5

Expected results:
- initially LD1, LD2, LD4 and LD5 should be on, other LEDs off.
- pressing SW1 should cause LD1 to turn off.
- pressing SW2 should cause LD2, LD4 and LD5 to turn off.

This should confirm:
- the FPGA is configured
- the SW1/SW2 are connected and working
- the incoming 50MHz clock is present
- the DCM is generating the slower speed (~16MHz) clock for the soft AVR

Dave

User avatar
sirmorris
Posts: 702
Joined: Wed Feb 11, 2009 12:18 pm
Location: oxfordshire uk
Contact:

Re: ICE T65/Z80/6809

Postby sirmorris » Sat Jul 29, 2017 11:48 am

That works!

1,2, 4,5 on.
Press 1, 1 goes out,
Press 2, 2,4,5 go out.

User avatar
Elminster
Posts: 1632
Joined: Wed Jun 20, 2012 8:09 am
Location: Essex, UK

Re: ICE T65/Z80/6809

Postby Elminster » Sat Jul 29, 2017 11:49 am

My spartan 6 arrived today. Hopefully play with it this weekend. Make it do something.

User avatar
sirmorris
Posts: 702
Joined: Wed Feb 11, 2009 12:18 pm
Location: oxfordshire uk
Contact:

Re: ICE T65/Z80/6809

Postby sirmorris » Sat Jul 29, 2017 11:50 am

\:D/ \:D/ \:D/ and then there were two :D

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

Re: ICE T65/Z80/6809

Postby hoglet » Sat Jul 29, 2017 11:53 am

sirmorris wrote:That works!

1,2, 4,5 on.
Press 1, 1 goes out,
Press 2, 2,4,5 go out.

Is there still no activity on the Tx LED when you release SW2?

Dave

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

Re: ICE T65/Z80/6809

Postby hoglet » Sat Jul 29, 2017 12:13 pm

Elminster wrote:My spartan 6 arrived today. Hopefully play with it this weekend. Make it do something.

Excellent.

What date/time did you receive the dispatch email from eepizza?

Hopefully mine will be arrive in the next few days as well.

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

Re: ICE T65/Z80/6809

Postby hoglet » Sat Jul 29, 2017 1:10 pm

Charlie,

I've been checking the warnings from the Xilinx tools and this led me to discover I goofed up my test code, so it wasn't actually properly testing the clocks.

Can you try this slightly more sophisticated version please:
icez80_test2.zip
(340.32 KiB) Downloaded 6 times

When sw2 is held down:
- LD4 should flash at 0.96Hz
- LD5 should flash at 2.98Hz

Also, LD7 should normally be off, and will flicker if there is any activity on the serial port out of the AVR. On my board I see this when SW2 is released.

I feel I must be missing the obvious here!

Dave

User avatar
sirmorris
Posts: 702
Joined: Wed Feb 11, 2009 12:18 pm
Location: oxfordshire uk
Contact:

Re: ICE T65/Z80/6809

Postby sirmorris » Sat Jul 29, 2017 3:06 pm

I thought there must be some collateral along with the board and sure enough in the eBay listing there's a link to docs and some test code - did you see that? Perhaps there are clues. I asked Jason for his bitfile and all things being equal that should work right? I'll give your latest a whirl.

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

Re: ICE T65/Z80/6809

Postby hoglet » Sat Jul 29, 2017 3:11 pm

sirmorris wrote:I thought there must be some collateral along with the board and sure enough in the eBay listing there's a link to docs and some test code - did you see that?

Yes, I found that a few days ago. Unfortunately, there's nothing there that explains what we are seeing.
sirmorris wrote:I asked Jason for his bitfile and all things being equal that should work right?

Yes, that should produce serial output. Just make sure you don't plug the Z80 jumpered adapter board in. i.e. just the FPGA board on it's own.


Dave

User avatar
sirmorris
Posts: 702
Joined: Wed Feb 11, 2009 12:18 pm
Location: oxfordshire uk
Contact:

Re: ICE T65/Z80/6809

Postby sirmorris » Sat Jul 29, 2017 3:21 pm

OK new code flashed - no TX activity but the LEDs do flash at different rates. Faster one scoped at 2.98hz, slower at .96hz as you specified. Spot on.

You're expending an incredible amount of time and patience on this Dave, thank you. Perhaps I should just send you the board :D

Edit: oops didn't notice the flickering of D7... It does indeed flicker when SW2 is released. Is it serial data or just an indicator?

Edit2 - looks like data on the scope. LA time.

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

Re: ICE T65/Z80/6809

Postby hoglet » Sat Jul 29, 2017 3:30 pm

sirmorris wrote:You're expending an incredible amount of time and patience on this Dave, thank you. Perhaps I should just send you the board :D

With any luck mine will turn up next week.
sirmorris wrote:Edit: oops didn't notice the flickering of D7... It does indeed flicker when SW2 is released. Is it serial data or just an indicator?

Interesting, it is the actual serial data (just inverted so idle is 0v), i.e. the boot message.

You should try scoping it and see if it looks RS232 ish.

You should see the same (just not inverted) on Pin 5 of the FTDI chip. If that's present, then it narrows the issue down significantly.

Dave

User avatar
sirmorris
Posts: 702
Joined: Wed Feb 11, 2009 12:18 pm
Location: oxfordshire uk
Contact:

Re: ICE T65/Z80/6809

Postby sirmorris » Sat Jul 29, 2017 3:35 pm

Screen Shot 2017-07-29 at 16.33.34.png


So the serial data is there, detected bit rate is 59405, inverted. Nothing from the ftdi though, I'm using a mac so I don't know if the drivers have nuked the chip but the listing says genuine ftdi. I'll buy a couple of replacements and change the on-board one anyway.

User avatar
sirmorris
Posts: 702
Joined: Wed Feb 11, 2009 12:18 pm
Location: oxfordshire uk
Contact:

Re: ICE T65/Z80/6809

Postby sirmorris » Sat Jul 29, 2017 3:40 pm

Nothing on ftdi pin 5.

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

Re: ICE T65/Z80/6809

Postby hoglet » Sat Jul 29, 2017 3:46 pm

sirmorris wrote:Screen Shot 2017-07-29 at 16.33.34.png

So the serial data is there, detected bit rate is 59405, inverted.

That's slightly faster than I would have expected, but should still work. Let me measure mine...

But it's completely under software control:
https://github.com/hoglet67/AtomBusMon/ ... atus.h#L50

A default for F_CPU is set here:
https://github.com/hoglet67/AtomBusMon/ ... ile.inc#L9

This was right for the GODIL (49,152,000 * 10 / 31) = 15855483

The correct value for your board is (50,000,000 * 10 / 31) = 16129032

Let me do a build that corrects that.

sirmorris wrote:Nothing on ftdi pin 5.

This is the problem I think.

Can you scope pin 46 of the Xilinx?

I wonder if there is a dry joint or a broken track.

Dave
Last edited by hoglet on Sat Jul 29, 2017 7:34 pm, edited 1 time in total.

User avatar
sirmorris
Posts: 702
Joined: Wed Feb 11, 2009 12:18 pm
Location: oxfordshire uk
Contact:

Re: ICE T65/Z80/6809

Postby sirmorris » Sat Jul 29, 2017 3:55 pm

Pin 46 has the serial data. Pin 4 (RX) of ftdi does not. I've reflowed the pins of both but no change.
Last edited by sirmorris on Sat Jul 29, 2017 4:06 pm, edited 1 time in total.

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

Re: ICE T65/Z80/6809

Postby hoglet » Sat Jul 29, 2017 4:05 pm

sirmorris wrote:Pin 46 has the serial date. Pin 5 of ftdi does not. I've reflowed the pins of both but no change.

Can you confirm my reading of the schematic (in that rar file) that they should both be connected?

The baud rate being out-of-spec is due to the divisor being quite small (~17).

For the 49.152MHz GODIL:

Code: Select all

49152000*10/31/16/18
55053

49152000*10/31/16/17
58292

49152000*10/31/16/16
61935


For the 50MHz LX9:

Code: Select all

50000000*10/31/16/18
56003

50000000*10/31/16/17
59297

50000000*10/31/16/16
63004

The ideal divisor at 50MHZ would be 17.5011200716.

Might be able to fiddle with the DCM to get this closer...

Dave


Return to “acorn atom”

Who is online

Users browsing this forum: No registered users and 4 guests