Template: Open16F877A User Manual

From Waveshare Wiki
Revision as of 06:12, 14 July 2015 by Wiki Editorial Team (talk | contribs) (Wiki Editorial Team moved page Open16F877A User Manual to Template:Open16F877A User Manual)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Basic Opration

Power Up and Download

Connect the board to a PIC programmer(PICkit3 recommanded) to download programs. As shown in the following figure:

PICkit3-debugger.JPG

Getting Started

The PIC board should be powered and downloaded corresponding demo.

1-WIRE_DS18B20

Demo Description

  • Measure the temperature of DS18B20 via 1-WIRE socket.

How to operate

Steps

  1. Connect a jumper between VCC and 3.3V. Note: if VCC is connected to 5V, LCD1602 will be too bright to display..
  2. Connect a DS18B20+ to 1-WIRE socket (Warning: Please make sure DS18B20+ is connected correctly to the ONE WIRE port, Arc side of DS18B20+ must match the sign of ONE WIRE port. Do NOT connect it reversely, or it may be burned.).
  3. Connect an LCD1602[1] to the LCD1602 interface.
  4. Power up and program the corresponding demo.

Expected Result

  • LCD1602 displays temperature

Phenomena
Connect DS18B20+LCD1602 displays temperature

2.2inch LCD

Demo Description

  • 2.2inch 320x240 Touch LCD demo

How to operate

Steps

  1. Connect a 2.2inch 320x240 Touch LCD (A)[2] to LCD22 3.3V interface.
  2. Power up and program the corresponding demo.

Expected Result

  • Display something on the "LCD22", interact with it by touching

Phenomena
Connect LCD22Display

8 Push Buttons

Demo Description

How to operate

Steps

  1. Jumper LED JMP ON.
  2. Connect the 8 Push Buttons to 8I/Os interface (Note: The G pin on the 8 Push Buttons should be connected to the GND pin on the development board.).
  3. Power up and program the corresponding demo.

Expected Result

  • LED status keeps changing according to the 8 Push Buttons

Phenomena
Connect 8 Push Buttons to 8I/Os interface

8 SEG LED Board

Demo Description

How to operate

Steps

  1. Connect an 8 SEG LED Board to 16I/Os interface.
  2. Power up and program the corresponding demo.

Expected Result

  • Display something on the 8 SEG LED Board.

Phenomena
Connect 8 SEG LED Board后Expected Result

AD Keypad

Demo Description

  • Check A/D key voltage value from the AD I/O. AD Keypad module has 16 keys but only occupies one AD I/O, helps you to save limited I/O resources.

How to operate

Steps

  1. Connect an LCD1602[1] to the LCD1602 interface.
  2. Connect an AD Keypad to the upper row of 16I/Os interface, i.e. 16I/0s-2 connector. The pins VCC, GND and AD of the AD Keypad should be connected to the socket VCC, GND and DA0 of the 16I/Os interface separately.
  3. Power up and program the corresponding demo.

Expected Result

  • "LCD1602 displays the voltage level of the pressed key.

Phenomena
Displays the voltage level on the AD Keypad

AD_LCD1602

Demo Description

  • Check the voltage level on the pin of AD interface.

How to operate

Steps

  1. Connect an LCD1602[1] to the LCD1602 interface.
  2. Power up and program the corresponding demo.

Expected Result

  • LCD1602 displays the voltage level on the RA0 pin.

Phenomena
Displays the voltage level on the RA0 pin

CCP1_Infrared

Demo Description

  • Check the data from infrared receiver by RC2 port, and display the decoded number on LEDs.

How to operate

Steps

  1. Jumpers Infrared JMP and LED JMP are set to ON.

Expected Result

  • LED displays decoded number, when infrared remote controller sends data.

Phenomena
Infrared remote controls LED status

FT245

Demo Description

  • RD: FT245-read demo
  • WR: FT245-write demo

How to operate

Steps

  1. Remove the jumper VCCIO JMP from the FT245_USB_FIFO_Board_(mini).
  2. Remove the jumper 1-WIRE JMP from the PIC development board.
  3. Jumper LED JMP ON.
  4. Connect the pin side of FT245 USB FIFO Board to 16I/Os interface, the USB side to PC.
  5. Power up and program the corresponding demo.
  6. Run the software PuTTY. Choose the corresponding COM port. Baud rate is set to 19200.

Expected Result

  • RD: Send data from the PC and L0~L7 LEDs will display a corresponding binary number.
  • WR: Serial Port Monitor prints the received data.

Phenomena

Connect FT245

Note: This string from the COM port should be shown in hex form. If it is not shown in hex form, you will just see the characters you have just sent.

Expected Result of Writing Demo

I2C_AT24CXX

Demo Description

  • I2C EEPROM read and write Demo.

How to operate

Steps

  1. Jumper LED JMP ON.
  2. Connect an AT24CXX EEPROM Board to the I2C interface.
  3. Power up and program the corresponding demo.

Expected Result

  • First of all, MCU writes data to AT24CXX, and then read the AT24CXX data written before. Finally, LEDs show the data as a binary number.

Phenomena
LEDs show the AT24CXX data written before

I2C_PCF8563

Demo Description

  • PCF8563 RTC Demo

How to operate

Steps

  1. Connect a PCF8563 RTC Board to I2C interface.
  2. Connect an 8 SEG LED Board to 16I/O interface.
  3. Power up and program the corresponding demo.

Expected Result

Phenomena
Connect PCF8563 RTC Board8 SEG LED Board Shows A Time

I2C_PCF8574

Demo Description

  • PCF8574 I2C Demo

How to operate

Steps

  1. Jumper LED JMP ON.
  2. Connect a PCF8574 IO Expansion Board to I2C interface.
  3. Connect the P0~P7 on the module to L0~L7 on the mother board.
  4. Power up and program the corresponding demo.

Expected Result

  • Display data on the LEDs.

Phenomena
LEDs

I2C_PCF8591

Demo Description

  • PCF8591 AD Demo

How to operate

Steps

  1. Connect a PCF8591 AD DA Board to I2C interface.

Expected Result

  • AD value is read and increased by 1, and then shown on the LED as a binary number.

Phenomena
Display AD Value

Interrupts LED

Demo Description

  • External Interrupt Demo

How to operate

Steps

  1. Remove the jumper 1-WIRE JMP.
  2. Remove the jumper L0.
  3. Connect the pin RB0 to the KEY JMP pin S0.
  4. Power up and program the corresponding demo.

Expected Result

  • LED1 will be changed by key S0

Phenomena
Key S0 Triggers Interrupt To Control LED1 Status

JOYSTICK

Demo Description

  • Joystick: Press the JOYSTICK buttons to control LEDs.

How to operate

Steps

  1. Jumpers LED JMP and JOYSTICK are set to ON.
  2. Power up and program the corresponding demo.

Expected Result

  • Press the JOYSTICK buttons to control LEDs.

KEY

Demo Description

  • Press the onboard buttons to control LEDs.

How to operate

Steps

  1. Jumpers LED JMP and KEY JMP are set to ON.
  2. Power up and program the corresponding demo.

Expected Result

  • Press S0 and S1 to control LEDs.

LCD1602

Demo Description

  • Control LCD1602 [1] to display.

How to operate

Steps

  1. Connect an LCD1602 to LCD1602 interface.
  2. Power up and program the corresponding demo.

Expected Result

  • LCD1602 shows "waveshare".

Phenomena
LCD1602 Shows "waveshare"

LED

Demo Description

  • Control LEDs by I/O interface.

How to operate

Steps

  1. Jumper LED JMP ON.
  2. Power up and program the corresponding demo.

Expected Result

  • LED keeps blinking

PS2

Demo Description

  • PS/2 keyboard demo.

How to operate

Steps

  1. Jumper PS/2 JMP ON.
  2. Connect a PS/2 keyboard to PS/2 interface.
  3. Remove jumper Buzzer JMP.
  4. Connect an LCD1602 to LCD1602 interface.
  5. Power up and program the corresponding demo.

Expected Result

  • LCD displays corresponding input from a PS/2 keyboard.

Phenomena
Set Jumpers And Connect LCD1602Displays

PWM_Buzzer

Demo Description

  • Buzzer/PWM demo

How to operate

Steps

  1. Connect the RC2 to the BUZ of Buzzer JMP.
  2. Power up and program the corresponding demo.

Expected Result

  • Buzzer will buzz.

Phenomena
Control Buzz By PWM

SPI_AT45DBXX

Demo Description

  • AT45DB demo

How to operate

Steps

  1. Connect AT45DBXX DataFlash Board to the lower row of SPI interface.
  2. Power up and program the corresponding demo.

Expected Result

  • The LEDs, as a binary number, will show the data read from AT45DB.

Phenomena
Connect AT45DBXX DataFlash BoardThe Data Read From AT45DBXX DataFlash Board Will Be Shown By LEDs

SPI_NRF24L01

Demo Description

  • NRF2401 demo

How to operate

Steps

  1. Prepare two groups of NRF24L01 RF Board (B) and PIC motherboard (one for sender - TX and the other one for receiver - RX).
  2. Set the power jumper of the two boards to 3.3V.
  3. LED JMP on the RX board should be fitted.
  4. Connect two NRF24L01 RF Board (B) to the two PIC boards.
  5. Connect a PL2303 USB UART Board (mini) to the RX board.
  6. Power up and program the corresponding demo.
  7. Run the software PuTTY. Choose the corresponding COM port and set baud rate to 19200.

Expected Result

  • Press the S0 button on the TX board, the LEDs on the RX board will be changed and PuTTY will print the received value.

Phenomena
NRF2401 Modules Connection The LEDs On The RX Board Will Be Changed And PuTTY Will Print The Received Value

SPI_SD_Card

Demo Description

  • SD demo

How to operate

Steps

  1. Jumper LED JMP ON.
  2. Connect a 2G SD card into the Micro SD Storage Board.
  3. Connect a Micro SD Storage Board to SPI interface.
  4. Power up and program the corresponding demo.

Expected Result

  • The LEDs, as a binary number, will display the data, which are written to the SD card and read from it again.

Phenomena
LEDs Display The Data

Timer0_LED

Demo Description

  • T0 timer demo

How to operate

Steps

  1. Jumper LED JMP ON.
  2. Power up and program the corresponding demo.

Expected Result

  • LEDs blink.

Timer1_LED

Demo Description

  • T1 Timer demo

How to operate

Steps

  1. Set LED JMP to on.
  2. Power up and program the corresponding demo.

Expected Result

  • LEDs blink.

USART

Demo Description

  • USART demo

How to operate

Steps

  1. Connect the pin side of a PL2303 USB UART Board (mini) to USART interface, the USB side to a PC.
  2. Power up and program the corresponding demo.
  3. Run the software PuTTY. Choose the corresponding COM port and set baud rate to 19200.

Expected Result

  • Any characters sent by PuTTY will be received and printed on the PuTTY again.

Phenomena
Connect PL2303 USB UART BoardAny Characters Sent By PuTTY Will Be Received And Printed On The PuTTY Again.

References

  1. 1.0 1.1 1.2 1.3 LCD1602: to the LCD1602 interface. Click in for more details.
  2. 2.2inch 320x240 Touch LCD (A): Click in Multi Color LCD for more details.