Microchip® Advanced Software Framework

conf_EPD.h File Reference

The EPD configurations.

Copyright (c) 2012-2014 Pervasive Displays Inc. All rights reserved.

Macros

#define COG_SPI_baudrate   12000000
 The SPI frequency of this kit (12MHz) More...
 
#define COG_V110_G1
 Supported COG version. More...
 
#define EPD_ADCRefVcc   1.65f
 ADC ref voltage = VCC/2 = 3.3/2. More...
 
#define EPD_ADCres   (float)pow(2,12)
 2 ^12 More...
 
#define EPD_ADCSampleCount   16
 ADC sampling counter. More...
 
#define EPD_BORDER_PIN   IOPORT_CREATE_PIN (PORTF,1)
 GPIO Defines. More...
 
#define EPD_BUSY_PIN   IOPORT_CREATE_PIN (PORTE,5)
 MEGA256RFR2 EXT1.pin9. More...
 
#define EPD_DegCOffset   5.5f
 the offset of SAM4L MCU More...
 
#define EPD_DISCHARGE_PIN   IOPORT_CREATE_PIN (PORTE,2)
 MEGA256RFR2 EXT1.pin5. More...
 
#define EPD_PANELON_PIN   IOPORT_CREATE_PIN (PORTB,6)
 MEGA256RFR2 EXT1.pin8. More...
 
#define EPD_PWM_PIN   IOPORT_CREATE_PIN (PORTB,5)
 MEGA256RFR2 EXT1.pin7. More...
 
#define EPD_RST_PIN   IOPORT_CREATE_PIN (PORTE,3)
 MEGA256RFR2 EXT1.pin6. More...
 
#define EPD_SPI_baudrate   COG_SPI_baudrate
 the baud rate of SPI More...
 
#define EPD_SPI_CLK_MUX
 SPI Pin config: SCK on PB1. More...
 
#define EPD_SPI_CLK_PIN   IOPORT_CREATE_PIN (PORTB,1)
 MEGA256RFR2 EXT1.pin18. More...
 
#define EPD_SPI_CS_PIN   IOPORT_CREATE_PIN (PORTG,0)
 MEGA256RFR2 EXT1.pin15. More...
 
#define EPD_SPI_ID   &SPCR
 SPI Defines. More...
 
#define EPD_SPI_MISO_MUX   IOPORT_DIR_INPUT
 SPI Pin config: MISO on PB3. More...
 
#define EPD_SPI_MISO_PIN   IOPORT_CREATE_PIN (PORTB,3)
 MEGA256RFR2 EXT1.pin17. More...
 
#define EPD_SPI_MOSI_MUX
 SPI Pin config: MOSI on PB2. More...
 
#define EPD_SPI_MOSI_PIN   IOPORT_CREATE_PIN (PORTB,2)
 MEGA256RFR2 EXT1.pin16. More...
 
#define EPD_SPI_SS_MUX
 SPI Pin config: SS on PG0. More...
 
#define EPD_SPI_SS_PIN   IOPORT_CREATE_PIN (PORTG,0)
 MEGA256RFR2 EXT1.pin15. More...
 
#define EPD_TC_ClockSignalSel   TC_CLKSEL_DIV1_gc
 clkIO/1 More...
 
#define EPD_TC_TIMER_CHANNEL   TC_COMPA
 Timer/Counter(TC) Compare Trigger Channel. More...
 
#define EPD_TC_TIMER_ID   &TCCR1A
 unused pins More...
 
#define EPD_TC_TIMER_IRQn   TIMER1_OVF_vect_num
 Timer/Counter(TC) Interrupt Number. More...
 
#define EPD_TC_WAVEFORM_CHANNEL   TC_COMPA
 Timer/Counter(TC) Compare Trigger Channel. More...
 
#define EPD_TC_WAVEFORM_ID   &TCCR1A
 Timer/Counter(TC) to Waveform mode. More...
 
#define EPD_TC_WAVEFORM_PIN   EPD_PWM_PIN
 Timer/Counter(TC) PWM output pin. More...
 
#define EPD_TC_WAVEFORM_PIN_FLAGS
 TC output pin configuration. More...
 
#define EPD_TC_WAVEFORM_PWM_DUTY_CYCLE   50
 PWM duty cycle = 50%. More...
 
#define EPD_TC_WAVEFORM_PWM_FREQUENCY   100000
 PWM frequency = 100K Hz. More...
 
#define EPD_Temperature_Sensor_ADC   0
 Temperature ADC Defines. More...
 
#define EPD_TempeScaled   2.5f
 the scale of temperature circuit More...
 

#define COG_SPI_baudrate   12000000

The SPI frequency of this kit (12MHz)

#define COG_V110_G1

Supported COG version.

Note
  • place the value here to assign which COG driving waveform will be used.
  • Options are COG_V110_G1, COG_V230_G2
#define EPD_ADCRefVcc   1.65f

ADC ref voltage = VCC/2 = 3.3/2.

Referenced by get_temperature().

#define EPD_ADCres   (float)pow(2,12)

2 ^12

Referenced by get_temperature().

#define EPD_ADCSampleCount   16

ADC sampling counter.

Referenced by get_temperature().

#define EPD_BORDER_PIN   IOPORT_CREATE_PIN (PORTF,1)

GPIO Defines.

MEGA256RFR2 EXT1.pin4. PF1 ADC1

Referenced by EPD_border_high(), EPD_border_low(), and EPD_initialize_gpio().

#define EPD_BUSY_PIN   IOPORT_CREATE_PIN (PORTE,5)

MEGA256RFR2 EXT1.pin9.

PE5 GPIO

Referenced by EPD_initialize_gpio(), and EPD_IsBusy().

#define EPD_DegCOffset   5.5f

the offset of SAM4L MCU

Referenced by get_temperature().

#define EPD_DISCHARGE_PIN   IOPORT_CREATE_PIN (PORTE,2)

MEGA256RFR2 EXT1.pin5.

PE2 GPIO

Referenced by EPD_discharge_high(), EPD_discharge_low(), and EPD_initialize_gpio().

#define EPD_PANELON_PIN   IOPORT_CREATE_PIN (PORTB,6)

MEGA256RFR2 EXT1.pin8.

PB5 OC1B

Referenced by EPD_initialize_gpio(), EPD_Vcc_turn_off(), and EPD_Vcc_turn_on().

#define EPD_PWM_PIN   IOPORT_CREATE_PIN (PORTB,5)

MEGA256RFR2 EXT1.pin7.

PB5 OC1A

Referenced by EPD_pwm_high(), and EPD_pwm_low().

#define EPD_RST_PIN   IOPORT_CREATE_PIN (PORTE,3)

MEGA256RFR2 EXT1.pin6.

PE3 GPIO

Referenced by EPD_initialize_gpio(), EPD_rst_high(), and EPD_rst_low().

#define EPD_SPI_baudrate   COG_SPI_baudrate

the baud rate of SPI

Referenced by epd_spi_init().

#define EPD_SPI_CLK_MUX
Value:
Definition: ioport.h:78
#define IOPORT_INIT_HIGH
Definition: mega/ioport.h:142

SPI Pin config: SCK on PB1.

Referenced by epd_spi_init().

#define EPD_SPI_CLK_PIN   IOPORT_CREATE_PIN (PORTB,1)

MEGA256RFR2 EXT1.pin18.

PB1, SPI SCK

Referenced by epd_spi_detach(), epd_spi_init(), and SPICLK_low().

#define EPD_SPI_CS_PIN   IOPORT_CREATE_PIN (PORTG,0)

MEGA256RFR2 EXT1.pin15.

PG0 SPI chip select A

Referenced by EPD_cs_high(), EPD_cs_low(), and EPD_initialize_gpio().

#define EPD_SPI_ID   &SPCR

SPI Defines.

SPI

Referenced by epd_spi_detach(), epd_spi_init(), epd_spi_read(), and epd_spi_write().

#define EPD_SPI_MISO_MUX   IOPORT_DIR_INPUT

SPI Pin config: MISO on PB3.

Referenced by epd_spi_init().

#define EPD_SPI_MISO_PIN   IOPORT_CREATE_PIN (PORTB,3)

MEGA256RFR2 EXT1.pin17.

PB3 SPI MISO

Referenced by epd_spi_detach(), epd_spi_init(), and SPIMISO_low().

#define EPD_SPI_MOSI_MUX
Value:
Definition: ioport.h:78
#define IOPORT_INIT_HIGH
Definition: mega/ioport.h:142

SPI Pin config: MOSI on PB2.

Referenced by epd_spi_init().

#define EPD_SPI_MOSI_PIN   IOPORT_CREATE_PIN (PORTB,2)

MEGA256RFR2 EXT1.pin16.

PB2 SPI MOSI

Referenced by epd_spi_detach(), epd_spi_init(), and SPIMOSI_low().

#define EPD_SPI_SS_MUX
Value:
Definition: ioport.h:78
#define IOPORT_INIT_HIGH
Definition: mega/ioport.h:142

SPI Pin config: SS on PG0.

#define EPD_SPI_SS_PIN   IOPORT_CREATE_PIN (PORTG,0)

MEGA256RFR2 EXT1.pin15.

PG0 SPI chip select A

Referenced by epd_spi_init().

#define EPD_TC_ClockSignalSel   TC_CLKSEL_DIV1_gc

clkIO/1

Referenced by initialize_EPD_timer(), and PWM_start_toggle().

#define EPD_TC_TIMER_CHANNEL   TC_COMPA

Timer/Counter(TC) Compare Trigger Channel.

Referenced by initialize_EPD_timer().

#define EPD_TC_TIMER_ID   &TCCR1A

unused pins

EPD Hardware module Defines PWM Define Timer/Counter(TC) to Timer mode

Referenced by initialize_EPD_timer(), PWM_start_toggle(), and stop_EPD_timer().

#define EPD_TC_TIMER_IRQn   TIMER1_OVF_vect_num

Timer/Counter(TC) Interrupt Number.

#define EPD_TC_WAVEFORM_CHANNEL   TC_COMPA

Timer/Counter(TC) Compare Trigger Channel.

Referenced by PWM_start_toggle().

#define EPD_TC_WAVEFORM_ID   &TCCR1A

Timer/Counter(TC) to Waveform mode.

Referenced by PWM_start_toggle(), and PWM_stop_toggle().

#define EPD_TC_WAVEFORM_PIN   EPD_PWM_PIN

Timer/Counter(TC) PWM output pin.

Referenced by PWM_start_toggle().

#define EPD_TC_WAVEFORM_PIN_FLAGS
Value:
Definition: ioport.h:78
#define IOPORT_INIT_HIGH
Definition: mega/ioport.h:142
#define IOPORT_MODE_PULLUP
Definition: mega/ioport.h:91

TC output pin configuration.

Referenced by PWM_start_toggle().

#define EPD_TC_WAVEFORM_PWM_DUTY_CYCLE   50

PWM duty cycle = 50%.

Referenced by PWM_start_toggle().

#define EPD_TC_WAVEFORM_PWM_FREQUENCY   100000

PWM frequency = 100K Hz.

Referenced by PWM_start_toggle().

#define EPD_Temperature_Sensor_ADC   0

Temperature ADC Defines.

MUX selection on Positive ADC input channel 4

Referenced by initialize_temperature().

#define EPD_TempeScaled   2.5f

the scale of temperature circuit

Referenced by get_temperature().