Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Si5351 + PIC16F1455 USB controller
#1
Evo jedna moja zanimljiva konstrukcija za programibilni oscilator (VFO / clock) baziran na Silicon Labs Si5351 sa Microchip USB kontrolerom PIC16F1455.



U pitanju je sklop koji kada se poveze na USB sa racunarom u sistemu se pojavi nov seriski (COM) port preko koga moze da se komunicira sa ovim modulom iz nekog terminal programa.

Podesavanje frekvencije na jednom od 3 izlaza se vrsi postavljanjem odgovarajucih vrednosti u registre Si5351 oscilatora.

Posto je to previse komplikovano za pocetnike (a sticicete i dotle) u samom PIC kontroleru je ugradjen racun za freknciju i svodi se na jednostavno unosenje frekvencije poput "14.010" izrazenim u MHz preko terminala.
Ovaj racun poseduje dovoljnu preciznost za opste ne tako zahtevne namene jer postoji greska prilikom racuna i uzrokovana je limitom 24 bitne matematike implementirane u PIC kontroleru.

Pregled komandi:

Code:
//------------------------------------------------------------
//dekoder komandi --------------------------------------------
//------------------------------------------------------------
switch (RS232_Out_Data[0]) {

    case 0x30:
        //0 - write 1MHz 10MHz 100MHz without correction, 8pF
        Write1 (mem_si_1_10_100, sizeof(mem_si_1_10_100));
        putrsUSBUSART("OK");
    break;

    case 0x31:
        //1 - write 70MHz + 4.545MHz
        Write1 (mem_si_70, sizeof(mem_si_70));
        putrsUSBUSART("OK");
    break;

    case 0x32:
        //2 - write 80MHz
        Write1 (mem_si_80, sizeof(mem_si_80));
        putrsUSBUSART("OK");
    break;

    case 0x33:
        //3 - write 3.7MHz (14.8MHz)
        Write1 (mem_37_new, sizeof(mem_37_new));
    break;

    case 0x65:
        //e - write regs from adres with len
        Write_SI_Regs_x(RS232_Out_Data);
        putrsUSBUSART("OK");
    break;

    case 0x73:
        //s - set single register
        WriteSi5351_single(RS232_Out_Data[1], RS232_Out_Data[2]);
    break;

    case 0x70:
        //p - write PLLA regs to I2C
        Write_SI_Regs_8(26, RS232_Out_Data);
        putrsUSBUSART("OK");
    break;
    
    case 0x77:
        //w - write MSO regs to I2C
        Write_SI_Regs_8(42, RS232_Out_Data);
        putrsUSBUSART("OK");
    break;
  
    default:
    if(USBUSARTIsTxTrfReady())
    {
        putrsUSBUSART("ERR");
    }

}

Format komande je koncipiran tako da uvek prvi karakter predstavlja komandu (0,1,2,3,e,s,p,w) dok su ostali karakteri opcioni tj adresa i podatak.
Dakle kada se povezete preko terminala na uredjaj, stiskanjem tastera "0" (ASCII vrednost 0x30) PIC kontroler izvrsava podesavanje frekvecnije izlaza na 1,10 i 100MHz.
Stiskanjem tastera "1" se podesava drugi set frekvencija, isto tako za tastere "2" i "3".

Za postavljanje fekvencije npr 1.25MHz treba poslati komandu:
"c1.25"

Ili npr za 28.125MHz
"c28.125"

Za vecu preciznost je neophodan PC software koji radi racun frekvencije i kao rezultat daje potrebne vrednosti za registre koji se posle upisuju u Si5351. Za te potrebe, za pocetak se moze upotrebiti gotov Windows program od proizvodjaca dostupan na ovoj stranici:
http://www.silabs.com/products/clocksosc...tools.aspx

Sledi nastavak ...


Attached Files
.pdf   Si5351-USB.pdf (Size: 221,51 KB / Downloads: 24)
.pdf   Si5351-B.pdf (Size: 359,17 KB / Downloads: 14)
.pdf   AN619.pdf (Size: 300,66 KB / Downloads: 20)
.hex   usb-pic16f1455-si5351.hex (Size: 24,93 KB / Downloads: 7)
Reply


Messages In This Thread
Si5351 + PIC16F1455 USB controller - by mikikg - 11-05-2014, 09:51 AM
RE: Si5351 + PIC16F1455 USB controller - by Gosha - 04-12-2016, 01:29 PM
RE: Si5351 + PIC16F1455 USB controller - by Gosha - 04-12-2016, 03:23 PM
RE: Si5351 + PIC16F1455 USB controller - by Gosha - 04-12-2016, 03:50 PM
RE: Si5351 + PIC16F1455 USB controller - by Gosha - 05-22-2017, 08:52 AM
RE: Si5351 + PIC16F1455 USB controller - by Gosha - 07-22-2017, 07:12 PM
RE: Si5351 + PIC16F1455 USB controller - by Gosha - 07-22-2017, 10:25 PM
RE: Si5351 + PIC16F1455 USB controller - by Gosha - 07-23-2017, 02:54 PM
RE: Si5351 + PIC16F1455 USB controller - by Gosha - 08-24-2017, 10:55 PM
RE: Si5351 + PIC16F1455 USB controller - by Gosha - 03-24-2023, 02:20 PM
RE: Si5351 + PIC16F1455 USB controller - by savan - 03-23-2023, 07:32 PM
RE: Si5351 + PIC16F1455 USB controller - by Gosha - 03-24-2023, 09:56 PM
RE: Si5351 + PIC16F1455 USB controller - by savan - 03-26-2023, 03:26 PM
RE: Si5351 + PIC16F1455 USB controller - by savan - 03-27-2023, 12:49 PM
RE: Si5351 + PIC16F1455 USB controller - by savan - 10-15-2023, 04:06 PM
RE: Si5351 + PIC16F1455 USB controller - by savan - 05-12-2023, 07:00 PM
RE: Si5351 + PIC16F1455 USB controller - by savan - 10-15-2023, 08:55 PM
RE: Si5351 + PIC16F1455 USB controller - by savan - 10-16-2023, 03:45 PM
RE: Si5351 + PIC16F1455 USB controller - by savan - 03-29-2024, 02:15 PM
RE: Si5351 + PIC16F1455 USB controller - by savan - 03-30-2024, 08:55 AM
RE: Si5351 + PIC16F1455 USB controller - by savan - 03-30-2024, 10:25 AM
RE: Si5351 + PIC16F1455 USB controller - by savan - 03-30-2024, 10:00 PM
RE: Si5351 + PIC16F1455 USB controller - by savan - 03-31-2024, 08:26 AM
RE: Si5351 + PIC16F1455 USB controller - by savan - 03-31-2024, 05:01 PM
RE: Si5351 + PIC16F1455 USB controller - by savan - 05-24-2024, 08:44 AM
RE: Si5351 + PIC16F1455 USB controller - by savan - 10-13-2024, 12:14 PM
RE: Si5351 + PIC16F1455 USB controller - by savan - 10-13-2024, 12:36 PM
RE: Si5351 + PIC16F1455 USB controller - by savan - 10-13-2024, 04:37 PM
RE: Si5351 + PIC16F1455 USB controller - by savan - 10-14-2024, 11:21 AM
RE: Si5351 + PIC16F1455 USB controller - by savan - 11-10-2024, 01:30 PM
RE: Si5351 + PIC16F1455 USB controller - by savan - 11-10-2024, 03:46 PM
RE: Si5351 + PIC16F1455 USB controller - by savan - 11-10-2024, 04:14 PM
RE: Si5351 + PIC16F1455 USB controller - by savan - 11-10-2024, 06:20 PM
RE: Si5351 + PIC16F1455 USB controller - by savan - 11-10-2024, 09:01 PM
RE: Si5351 + PIC16F1455 USB controller - by savan - 11-10-2024, 09:58 PM
RE: Si5351 + PIC16F1455 USB controller - by savan - 11-11-2024, 07:16 AM
RE: Si5351 + PIC16F1455 USB controller - by savan - 11-11-2024, 06:39 PM
RE: Si5351 + PIC16F1455 USB controller - by savan - 11-12-2024, 11:30 AM
RE: Si5351 + PIC16F1455 USB controller - by savan - 11-12-2024, 12:31 PM
RE: Si5351 + PIC16F1455 USB controller - by savan - 11-12-2024, 03:50 PM
RE: Si5351 + PIC16F1455 USB controller - by savan - 11-12-2024, 05:59 PM
RE: Si5351 + PIC16F1455 USB controller - by savan - 11-12-2024, 10:13 PM
RE: Si5351 + PIC16F1455 USB controller - by savan - 11-13-2024, 10:45 PM
RE: Si5351 + PIC16F1455 USB controller - by savan - 11-14-2024, 07:31 PM
RE: Si5351 + PIC16F1455 USB controller - by savan - 11-15-2024, 02:38 PM
RE: Si5351 + PIC16F1455 USB controller - by savan - 11-17-2024, 02:40 PM
RE: Si5351 + PIC16F1455 USB controller - by savan - 11-17-2024, 06:05 PM
RE: Si5351 + PIC16F1455 USB controller - by savan - 11-17-2024, 06:36 PM
RE: Si5351 + PIC16F1455 USB controller - by savan - 11-18-2024, 02:29 PM
RE: Si5351 + PIC16F1455 USB controller - by savan - 11-18-2024, 06:51 PM
RE: Si5351 + PIC16F1455 USB controller - by savan - 11-19-2024, 07:37 PM
RE: Upravo stiglo - by Khadgar2007 - 05-19-2017, 06:27 PM
RE: Upravo stiglo - by mikikg - 05-19-2017, 06:44 PM
RE: Upravo stiglo - by Khadgar2007 - 05-19-2017, 07:05 PM
RE: Upravo stiglo - by mikikg - 05-19-2017, 07:12 PM
RE: Upravo stiglo - by emiSAr - 05-19-2017, 07:41 PM
RE: Upravo stiglo - by mikikg - 05-19-2017, 09:57 PM
RE: Upravo stiglo - by Milan94 - 05-19-2017, 10:17 PM
RE: Upravo stiglo - by Gosha - 05-19-2017, 10:27 PM
RE: Upravo stiglo - by mikikg - 05-19-2017, 10:28 PM
RE: Upravo stiglo - by Milan94 - 05-19-2017, 10:33 PM
RE: Upravo stiglo - by Khadgar2007 - 05-19-2017, 10:38 PM
RE: Upravo stiglo - by mikikg - 05-19-2017, 10:41 PM
RE: Upravo stiglo - by Milan94 - 05-19-2017, 10:52 PM
RE: Upravo stiglo - by mikikg - 05-19-2017, 11:05 PM
RE: Upravo stiglo - by Khadgar2007 - 05-19-2017, 11:15 PM
RE: Upravo stiglo - by Milan94 - 05-19-2017, 11:24 PM
RE: Upravo stiglo - by mikikg - 05-19-2017, 11:44 PM
RE: Upravo stiglo - by Milan94 - 05-20-2017, 12:01 AM
RE: Upravo stiglo - by Khadgar2007 - 05-20-2017, 12:06 AM
RE: Upravo stiglo - by mikikg - 05-20-2017, 12:10 AM
RE: Upravo stiglo - by mikikg - 05-20-2017, 12:40 AM
RE: Upravo stiglo - by Khadgar2007 - 05-20-2017, 06:53 AM
RE: Upravo stiglo - by progster - 05-20-2017, 07:57 AM
RE: Upravo stiglo - by Khadgar2007 - 05-20-2017, 09:27 AM
RE: Upravo stiglo - by mikikg - 05-20-2017, 12:52 PM
RE: Upravo stiglo - by npejcic - 05-20-2017, 01:10 PM
RE: Upravo stiglo - by mikikg - 05-20-2017, 01:24 PM
RE: Upravo stiglo - by npejcic - 05-20-2017, 01:30 PM
RE: Upravo stiglo - by mikikg - 05-20-2017, 01:34 PM
RE: Upravo stiglo - by Khadgar2007 - 05-20-2017, 02:33 PM
RE: Upravo stiglo - by mikikg - 05-20-2017, 02:48 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)