1.4 CCL Manchester Encoder

This example application shows how to use the CCL peripheral library and generate a Manchester-encoded output.

Description

This demonstrates a way to generate a Manchester-encoded output using a SPI port and the CCL. The SPI port is sending out a predefined buffer of data in a circular fashion. Data is sent out LSB first, with CCL_OUT being the Manchester-encoded output. Pins are configured such that a logic analyzer can be attached to see the input (MOSI and SCK) and the output (CCL_OUT) simultaneously.

Downloading and Building the Application

To clone or download this application from Github, go to the main page of this repository and then click Clone button to clone this repository or download as zip file. This content can also be downloaded using content manager by following these instructions.

Path of the application within the repository is apps/ccl/manchester_encoder/firmware.

To build the application, refer to the following table and open the project using its IDE.

Project NameDescription
WBZ351_curiosity.XMPLABX project for PIC32CX WBZ351 Curiosity Board

Setting Up the Hardware

The following table shows the target hardware for the application projects.

Project NameBoard
WBZ351_curiosity.XPIC32CX WBZ351 Curiosity Board

Setting Up PIC32CX WBZ351 Curiosity Board

  • RA8 (pin 18 of Xpro Header) has SCK output
  • Use jumper from RA8 (pin 18 of Xpro Header) To RB5 (pin 7 of Xpro Header) (This routes SCK signal To CCLIN4)
  • RA7 (pin 16 of Xpro Header) has MOSI output
  • RB0 (pin 3 of Xpro Header) has CCL output (CCL_OUT1)
  • Connect the Debug USB port on the board to the computer using a micro USB cable

Running the Application

  1. Connect a logic analyzer to MOSI pin
  2. Connect a logic analyzer to SCK pin
  3. Connect a logic analyzer to the Manchester-encoded output CCL_OUT pin
  4. Refer to the following table for pin details:
    BoardMOSI PinSCK PinCCL_OUT Pin
    PIC32CX WBZ351 Curiosity BoardPin 16 of Xpro HeaderPin 18 of Xpro HeaderPin 3 of Xpro Header
  5. Build and Program the application using its IDE
  6. Observe the output on logic analyzer, it should follow the truth table as shown in the following diagram: