DatasheetQ Logo
Electronic component search and free download site. Transistors,MosFET ,Diode,Integrated circuits

PM9603APE Просмотр технического описания (PDF) - South African Micro Electronic Systems

Номер в каталоге
Компоненты Описание
производитель
PM9603APE
Sames
South African Micro Electronic Systems Sames
PM9603APE Datasheet PDF : 18 Pages
1 2 3 4 5 6 7 8 9 10 Next Last
PM9603AP
// This program will read the registers from a SA9603B device
and
// display the content on the screen.
// The program work on a PM9603AP demonstration module.
#include <stdio.h>
#include <math.h>
#define PI
3.141593
#define win_size 20
// Definitions for the parallel port
#define CLK_b
0x20 //D5 on port pin 7
#define DO_b
0x40 //D6 on port pin 8
#define DI_b
0x20 //Paper out pin 12
#define CS_b
0x80 //D7 on port pin 9
#define PCTrig
0x02 //D1 on port pin 3
//#define freq_bits
0x00FFFF
//#define inv_bits
0x0C0000
#define freq_bits 0x01FFFF
#define inv_bits 0x0E0000
#define bits_50hz 0x080000
// D16..D0
// Mask definitions for the parallele port
#define CLK_m
~CLK_b //D5 on port pin 7
#define DO_m
~DO_b //D6 on port pin 8
#define DI_m
~DI_b //Paper out pin 12
#define CS_m
~CS_b //D7 on port pin 9
#define byte_mask 0x80 //1000 0000
#define CLOCKFREQ 3579545
#define LPT1
0x378
#define LPT2
0x278
// Glogal variables
unsigned char portval;
double
arr_energy[win_size],arr_volt[win_size],arr_reactive[win_size];
long
delay_time;
10/18
sames

Share Link: 

datasheetq.com  [ Privacy Policy ]Request Datasheet ] [ Contact Us ]