MultiCLK Module for Atari 8-bit

Moderator: bbiernat

Post Reply
User avatar
pancio
Administrator
Posts: 65
Joined: 18 September 2013, 23:02 - Wed
Location: SILESIA

MultiCLK Module for Atari 8-bit

Post by pancio »

Hi Guys!

Introduction.
I would like to show you little different clock for your Atari... it's called Multi Clock Module and based on Si5351A programmable VCXO chip. The idea is to have all required frequencies on one board for all Atari models. How to do it? Si5351A has three independently clock generators which can be set to different frequency using I2C bus... so we need additional component like micro-controller in order to set proper frequency on each output channel. Schematic and PCB is very easy and anyone can make own device in home. I decided to use common module CJMCU-5351A instead Si5351A chip on my PCB because full equipped CJMCU-5351A (or clone) is cheaper than Si5351A! Strange but true.

This is the next project created as part of the activities of PTODT (Polskie Towarzystwo Ochrony Dziedzictwa Technicznego, which means the Polish Society for the Protection of Technical Heritage), founded for the protection of technical heritage, especially in the field of informatics and computers.

Project was made as Free Hardware under Creative Commons BY-NC-SA 4.0.This means - you can do it yourself, for private use. Commercial use is possible after obtaining the authors' consent.

Notice:
This device is still under development. Please read whole information carefully. If you plan to do device by your own hand, please use newest revision as possible.
MultiCLK Module PCB top view
MultiCLK Module PCB top view
MCM1.png (177.23 KiB) Viewed 493 times
MultiCLK Module PCB bottom view
MultiCLK Module PCB bottom view
MCM2.png (161.54 KiB) Viewed 493 times
Code

The main code is very simply. Just need to set proper frequency and send parameters to Si5351A registers... Code is based on Peter Rachow (DK7IH) library wrote for Atmega8 and adapted for RISC-V CH32V003.

Code: Select all

/*
 * Example for using I2C with SI5351
 * 21-11-2023 PanciO
 */


#define SI5351_ADDRESS 0x60

#include "ch32v003fun.h"
#include <stdio.h>
#include "i2c.h"
#include "si5351.h"
#include <string.h>

#define WRITE   0
#define READ    1
int main()
{
	SystemInit();                       // 48MHz internal clock
    SetupUART(UART_BRR);                // start serial @ default 115200bps
    USART1->CTLR1 |= USART_Mode_Rx;     // we need to additional turn on RX mode
    Delay_Ms(100);                      // startup delay

    if(!i2c_init())                     // I2C init
    {
        unsigned long freq1 = 14187570;  //Atari XE XTAL clock  (PAL))
        unsigned long freq2 = 3546895;   //Atari XL XTAL clock  (PAL)     
        //unsigned long freq2 = 3579545;  //Atari XL XTAL clock  (NTSC)
        unsigned long freq3 = 4433618;   //PAL

        i2c_init();
        si5351_start();                    
        si5351_set_freq(SYNTH_MS_0, freq1);
        si5351_set_freq(SYNTH_MS_1, freq2);
        si5351_set_freq(SYNTH_MS_2, freq3);
     }
    
    
    while(1)                            // main loop
    {
          //
    }
}//main()
 
t.b.c.
Attachments
i2c_si5351A-A8CLKs.zip
(820.74 KiB) Downloaded 8 times
MultiClockModularV1.0.zip
(411.02 KiB) Downloaded 10 times

Post Reply