Creating A Project

Set device model and orientation Toolbar > Device ID button Toggle showing object ID’s on display preview Toolbar > “ID” button Images The Image Library is a tab of the “Fonts” window Import images by clicking Add button. Every image an ID number – if you insert or delete any images, the ID number will […]

Read More

Programming the display

Programming via SD card Press the ‘Compile’ button Select File > Open Build Folder Copy the .tft file created onto a microSD card (FAT32 formatted). Insert the microSD card into the Nextion display and power it. You will see a message confirming the code is being uploaded. Once complete the display will display a message […]

Read More

.Nextion Editor General

Installing Nextion Editor Download the editor and install https://nextion.itead.cc/resources/download/nextion-editor/ Guides https://www.itead.cc/wiki/Nextion_Editor_Quick_Start_Guide https://randomnerdtutorials.com/nextion-display-with-arduino-getting-started/ Using With Arduino Install the Nextion library for Arduino.

Read More

.Nextion Displays General

Nextion are a range of HMI displays with built in controller that can be used with any microcontroller via a 2 pin UART interface. Nextion web site Models Nextion basic Nextion enhanced Built-in RTC Supports saving data to flash Supports GPIOs has larger flash capacity Faster CPU clock

Read More

Using Internal Oscillator

Using Internal Oscillator Just change this config option to select the Fast RC oscillator instead of PRIPLL.      #pragma config FNOSC = FRCPLL           // Oscillator Selection Bits (Fast RC Osc w/PLL) The Fast RC oscillator is 8MHz so same other setup as using an 8MHz crystal, apart from the accuracy not being […]

Read More

ADC Sampling Requirements

Setting up the AtoD Sampling Look up the following in the device datasheet: Tad = ADC Clock period ADC Clock Period Sample Time Conversion Time (value not needed to setup but this tells you how long it will take to convert) ADCS – ADC Conversion Clock Select bits ADC_CONV_CLK_#Tcy  This value sets Tad: Tpb (Peripheral bus speed) […]

Read More

Input Capture

Setup Input Capture //—– SETUP TIMER 3 —– //Used for: Input capture OpenTimer3((T3_ON | T3_IDLE_CON | T3_GATE_OFF | T3_PS_1_1 | T3_SOURCE_INT), 0xffff); //——————————- //—– SETUP INPUT CAPTURE —– //——————————- //Parameter 1: //IC_EVERY_FALL_EDGE Capture timer value on every falling edge of input applied at the ICx pin //IC_EVERY_RISE_EDGE  Capture timer value on every rising edge of […]

Read More

AD1PCFG or ANSEL

Most PIC32's use AD1PCFG to define pins as analog or digital, but not all.  If your device doesn't have that register: Look in the datasheet for ANSELx registers (ANSELA, ANSELB, etc) Check your OpenADC10() call if you use it isnt' based on ENABLE_AN0_ANA etc for the final AD1CSSL register parameter as these will be wrong for ANSELA etc based devices  

Read More

PGECx / PGEDx (PGC/PGD) pins

Where a device has multiple PGC/PGD pin pairs you can use any of the pairs.  When programming all of the pins become ready to accept a new programming sequence, its only when debugging you need to have set the correct pair in the config bits, which you can do when first programming by setting the […]

Read More