Wavebubble 2010 Hardware Test
Defines | Functions | Variables

main.h File Reference

Go to the source code of this file.

Defines

#define HW_REV_A
 Wave Bubble 2010 hardware revision.
#define SPICLK_PORT   PORTC
 SPI CLOCK Port for digital poti.
#define SPIDO_PORT   PORTC
 SPI DATA Port for digital poti.
#define SPICS_PORT   PORTC
 SPI CHIPSELECT Port for digital poti.
#define SPICLK_DDR   DDRC
 SPI CLOCK Direction for digital poti.
#define SPIDO_DDR   DDRC
 SPI DATA Direction for digital poti.
#define SPICS_DDR   DDRC
 SPI CHIPSELECT Direction for digital poti.
#define SPICLK   1
 SPI CLOCK Pin for digital poti.
#define SPIDO   2
 SPI DATA Pin for digital poti.
#define SPICS   3
 SPI CHIPSELECT Pin for digital poti.
#define BANDWADJ1_RES   1
 Digital potentiometer for VCO1.
#define BANDWADJ2_RES   0
 Digital potentiometer for VCO2.
#define FREQSET_DDR   DDRC
 Digital frequency set direction.
#define FREQSET_PORT   PORTC
 Digital frequency set port.
#define FREQSET   PC4
 Digital frequency set pin.
#define POWERON_PORT   PORTB
 Power ON switch port.
#define POWERON   PB7
 Power ON switch pin.
#define POWERON_DDR   DDRB
 Power ON direction.
#define POWERCTL1_PORT   PORTB
 Power control port VCO1.
#define POWERCTL1   PB7
 Power control pin VCO1.
#define POWERCTL1_DDR   DDRB
 Power control direction VCO1.
#define POWERCTL2_PORT   PORTD
 Power control port VCO2.
#define POWERCTL2   PD3
 Power control pin VCO2.
#define POWERCTL2_DDR   DDRD
 Power control direction VCO2.
#define LEDDDR   DDRD
 Direction for LED.
#define LEDPORT   PORTD
 Port for LED.
#define LED   PD7
 Pin for LED.

Functions

void set_sawtooth_low (void)
void set_sawtooth_high (void)
void set_resistor (uint8_t rnum, uint8_t rval)
void delay_ms (uint16_t ms)

Variables

volatile char in_char

Detailed Description

Main header file


Define Documentation

#define BANDWADJ1_RES   1

Digital potentiometer for VCO1.

Referenced by main(), test_pll2_rf(), test_resistors(), test_vcos(), tune_rf(), and tune_rf_band().

#define BANDWADJ2_RES   0

Digital potentiometer for VCO2.

Referenced by main(), test_pll2_if(), test_resistors(), test_vcos(), tune_if(), and tune_rf_band().

#define FREQSET   PC4

Digital frequency set pin.

Referenced by set_sawtooth_high(), and set_sawtooth_low().

#define FREQSET_DDR   DDRC

Digital frequency set direction.

Referenced by set_sawtooth_high(), and set_sawtooth_low().

#define FREQSET_PORT   PORTC

Digital frequency set port.

Referenced by set_sawtooth_high(), and set_sawtooth_low().

#define HW_REV_A

Wave Bubble 2010 hardware revision.

#define LED   PD7

Pin for LED.

Referenced by main(), and test_led().

#define LEDDDR   DDRD

Direction for LED.

Referenced by main().

#define LEDPORT   PORTD

Port for LED.

Referenced by main(), and test_led().

#define POWERCTL1   PB7
#define POWERCTL1_DDR   DDRB

Power control direction VCO1.

Referenced by main().

#define POWERCTL1_PORT   PORTB
#define POWERCTL2   PD3
#define POWERCTL2_DDR   DDRD

Power control direction VCO2.

Referenced by main().

#define POWERCTL2_PORT   PORTD
#define POWERON   PB7

Power ON switch pin.

Referenced by main().

#define POWERON_DDR   DDRB

Power ON direction.

Referenced by main().

#define POWERON_PORT   PORTB

Power ON switch port.

Referenced by main().

#define SPICLK   1

SPI CLOCK Pin for digital poti.

Referenced by main(), and set_resistor().

#define SPICLK_DDR   DDRC

SPI CLOCK Direction for digital poti.

Referenced by main().

#define SPICLK_PORT   PORTC

SPI CLOCK Port for digital poti.

Referenced by main(), and set_resistor().

#define SPICS   3

SPI CHIPSELECT Pin for digital poti.

Referenced by main(), and set_resistor().

#define SPICS_DDR   DDRC

SPI CHIPSELECT Direction for digital poti.

Referenced by main().

#define SPICS_PORT   PORTC

SPI CHIPSELECT Port for digital poti.

Referenced by main(), and set_resistor().

#define SPIDO   2

SPI DATA Pin for digital poti.

Referenced by main(), and set_resistor().

#define SPIDO_DDR   DDRC

SPI DATA Direction for digital poti.

Referenced by main().

#define SPIDO_PORT   PORTC

SPI DATA Port for digital poti.

Referenced by set_resistor().


Function Documentation

void delay_ms ( uint16_t  ms)

Milliseconds delay function

Used microseconds delay function from avrlibc

Parameters:
msNumber of Milliseconds to delay

Referenced by test_dc(), test_led(), test_pll1(), test_pll2_if(), test_pll2_rf(), test_powerswitch1(), test_powerswitch2(), test_resistors(), test_vcos(), tune_if(), tune_rf(), and tune_rf_band().

void set_resistor ( uint8_t  rnum,
uint8_t  rval 
)

Set digital potentiometer

Parameters:
rnumNumber of potentiometer, 0 or 1
rvalResistor value to set, 0 - 255

Referenced by main(), test_pll2_if(), test_pll2_rf(), test_resistors(), test_vcos(), tune_if(), tune_rf(), and tune_rf_band().

void set_sawtooth_high ( void  )

Set NE555 high frequency mode

Enable 20KHz sawtooth

Referenced by main(), and tune_rf_band().

void set_sawtooth_low ( void  )

Set NE555 low frequency mode

Enable 100Hz sawtooth

Referenced by main(), test_pll2_if(), test_pll2_rf(), and tune_rf_band().


Variable Documentation

volatile char in_char

Referenced by ISR(), main(), test_pll2_if(), and test_pll2_rf().