Search found 36 matches

by Michael
Tue Jul 16, 2024 1:36 pm
Forum: Other
Topic: Motorola 6840 Programmable Timer Module (PTM)
Replies: 17
Views: 4503

Re: Motorola 6840 Programmable Timer Module (PTM)

lenzjo wrote: Tue Jul 16, 2024 1:32 pm MECB SYS-IO card. It has a PS2 kybd port, RTC chip with battery backup, dual uart and a 6522 onboard.
Sounds like a good board. Schematic?
by Michael
Tue Jul 16, 2024 6:13 am
Forum: Other
Topic: Motorola 6840 Programmable Timer Module (PTM)
Replies: 17
Views: 4503

Re: Motorola 6840 Programmable Timer Module (PTM)

I just thought I'd check-in with the Forum, to see what I've missed, before I dive back into some more KiCAD fun. :geek: I'm glad to see you're making great progress, and solving those ever-arising challenges! Thanks Greg. I just uploaded my tutorial videos documenting the process we went through o...
by Michael
Tue Jul 16, 2024 12:11 am
Forum: Other
Topic: Motorola 6840 Programmable Timer Module (PTM)
Replies: 17
Views: 4503

Re: Motorola 6840 Programmable Timer Module (PTM)

Sadly, it appears I'm not quite done yet. I am getting 1000 ticks on each blink of my LED and output to serial (TICKS0..3 increments in multiples of 0x03E8 as expected). However, the delay between each tick is much longer than 1 second. This applies for setting the timer 1 latch to 1000 for 1Mhz and...
by Michael
Mon Jul 15, 2024 9:15 pm
Forum: Other
Topic: Motorola 6840 Programmable Timer Module (PTM)
Replies: 17
Views: 4503

Re: Motorola 6840 Programmable Timer Module (PTM)

I set up timer 1 in continuous mode and made a real time clock.. I appreciate that. Thanks. I plan on doing a few tutorials on this in order to make it easier for the next person. This will be good for the one where I add the 3rd I/O component (the ACIA : real time clock output to the serial port)....
by Michael
Mon Jul 15, 2024 1:31 pm
Forum: Other
Topic: Motorola 6840 Programmable Timer Module (PTM)
Replies: 17
Views: 4503

Re: Motorola 6840 Programmable Timer Module (PTM)

The code sets up the 6840 to cause an interrupt after the countdown from some value (timer_LSB/timer_MSB); for each interrupt a 32-bit counter is incremented. The main loop simply reads the 32-bit counter and writes it to the terminal. It's not exactly what you asked for but I hope that providing a...
by Michael
Mon Jul 15, 2024 1:54 am
Forum: Other
Topic: Motorola 6840 Programmable Timer Module (PTM)
Replies: 17
Views: 4503

Re: Motorola 6840 Programmable Timer Module (PTM)

My latest (non working) attempt for review. The ISR is never triggered. (complete source here: https://github.com/sillycowvalley/Hopper/blob/main/Source/Runtime/6502/Devices/PIA6821.asm#L91 ) // Motorola 6840 PTM (Programmable Timer Module) const uint TCR = 0xF000; // Write: Timer Control Registers ...
by Michael
Mon Jul 15, 2024 12:05 am
Forum: Other
Topic: Motorola 6840 Programmable Timer Module (PTM)
Replies: 17
Views: 4503

Re: Motorola 6840 Programmable Timer Module (PTM)

lenzjo wrote: Sun Jul 14, 2024 8:21 pm I just found a rather tasty pdf you might like ;)
I already have the datasheet, thanks. That's how I wrote my attempt at a driver that isn't working. I'm looking for sample 6502 source code now.
by Michael
Sun Jul 14, 2024 4:14 pm
Forum: 6502
Topic: I/O mapped to F0xx
Replies: 26
Views: 5327

Re: I/O mapped to F0xx

This is a good read on overclocking the Motorola chips, propogation delays (glue logic is a non-issue) and memory speed limits:
https://digicoolthings.com/minimalist-e ... 809-speed/

4Mhz appears to be a good safe upperbound for now.
by Michael
Sun Jul 14, 2024 4:06 pm
Forum: 6502
Topic: I/O mapped to F0xx
Replies: 26
Views: 5327

Re: I/O mapped to F0xx

I wrote a simple LED blinker on PA0. Works fine with a 4 MHz can oscillator. Dead duck with 8MHz. Program uses only the CPU, the EEPROM and the PIA and that was my clue (since my SBC uses the WD 65C22) The Motorola MC6821 PIA is typically rated for operation up to 1 MHz, with some configurations pot...
by Michael
Sun Jul 14, 2024 3:40 pm
Forum: 6502
Topic: I/O mapped to F0xx
Replies: 26
Views: 5327

Re: I/O mapped to F0xx

I was thinking about the high-speed issue ... I wonder if it is to do with having the bus? It's another difference between a fairly small and compact SBC version and the MECB version. Maybe at >4 MHz there are some timing issues happening on the bus? I've run at 8MHz on a breadboard with a nest of ...