aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Stubs Collection/stubs/prescalar2.cs
blob: 305cc6c5f6eab947dd586526e821309aa3a39a05 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
using System;
using System.Text;
using System.Linq;
using System.Drawing;
using System.Diagnostics;
using System.Windows.Forms;
using System.Threading;
using System.Threading.Tasks;
using System.Collections.Generic;
using Tango.PMR.Stubs;
using Tango.Stubs;
include "..\..\Defines\Tango_Defines_Basic.cs"
include "Tango_Defines_SSI.cs"

const Int32 FPGA2 =  0x60000400;
const Int32 F1_Prescaler1_reg1	= 0x122; 

public void OnExecute(StubManager stubManager)
{
	Fpga_Read_Reg(FPGA2, F1_Prescaler1_reg1, 0);	
	
	//Set output clock frequency to about 200 kHz
	Fpga_Write_Reg(FPGA2, F1_Prescaler1_reg1, 0x0250, 0);
	
	Fpga_Read_Reg(FPGA2, F1_Prescaler1_reg1, 0);
}