Initial Release of Program for PAT9125 OTS on L476RG Platform

Dependencies:   mbed

Fork of PAT9125_OTS_L476RG by PixArt

This section highlights the setup and operating guide to integrating PAT9125EL with the Nucleo L476RG.

Setup

Hardware:

  • 1. PC with Windows Operating System
  • 2. Nucleo L476RG Dev Kit Board from ST
  • 3. PAT9125EL Arduino Enabled Board
  • 4. USB Cable (one end with miniUSB)

Connection:

Please connect the board as show below.

/media/uploads/pixus_mbed/connection_with_labeling.jpg

Supplying Power

Connect the one end of the USB to the PC USB and the other to the Nucleo L476RG miniUSB as shown in the figure below.

/media/uploads/pixus_mbed/connection_with_power_led_red.jpg

I am assuming that you already know and are able to download the code at this point. Once programmed with the latest compiled .bin file, the LED should turn Green, as illustrated below.

/media/uploads/pixus_mbed/connection_with_power_led_green.jpg

Next, we will test to see if the sensor (PAT9125EL) is indeed functional, and able to display the rotational displacement, on the on-board LCD Display.

While you rotate the Rotational Shaft clockwise, you should see an increment in the digital count for "SHAFT" on the LCD Display, also showing "Up" as you rotate the shaft in the clockwise direction.

While you rotate the Rotational Shaft counter-clockwise, you should see decrease in the digital counts under "SHAFT"on the LCD Display, also showing "Down" as you rotate the shaft in the counter-clockwise direction.

While you push the shaft inward, you should see an increment in digital counts under SPRING. While pushed inward, it will show as "Pre" for Press on the LCD Display.

Conversely, once you release the shaft, the LCD Display should show "Rel" for "Release".

To RESET the digital count, press on the button on the bottom left side of the board. This should reset the digital count on "SHAFT" and "SPRING" to "+0000".

Have fun with this and should you have any questions, please do not hesitate to contact us.

Committer:
pixus_mbed
Date:
Fri Oct 20 10:58:39 2017 +0000
Revision:
15:089f1d28d152
Parent:
0:411244c71423
1. Separate LCD and UART mode.; 2. Configure BTN with default pull-up.; 3. NULL handle.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
pixus_mbed 0:411244c71423 1 #ifndef PIXART_LCM_H
pixus_mbed 0:411244c71423 2 #define PIXART_LCM_H
pixus_mbed 0:411244c71423 3
pixus_mbed 0:411244c71423 4 #include "stdint.h"
pixus_mbed 0:411244c71423 5 #include "mbed.h"
pixus_mbed 0:411244c71423 6
pixus_mbed 0:411244c71423 7 typedef uint8_t boolean ;
pixus_mbed 0:411244c71423 8
pixus_mbed 0:411244c71423 9 class pixart_lcm
pixus_mbed 0:411244c71423 10 {
pixus_mbed 0:411244c71423 11 public:
pixus_mbed 0:411244c71423 12
pixus_mbed 0:411244c71423 13 pixart_lcm(SPI *pSPI, DigitalOut *pCSB, DigitalOut *pRSTB, DigitalOut *pRS) ;
pixus_mbed 15:089f1d28d152 14 void LCM_DisplayString(unsigned char line, unsigned char position, const char *ptr) ;
pixus_mbed 15:089f1d28d152 15 void LCM_DisplayDecimal(unsigned char line, unsigned char position, unsigned int hex_word, unsigned char digits) ;
pixus_mbed 15:089f1d28d152 16 void LCM_DisplayString_Reset(void);
pixus_mbed 15:089f1d28d152 17 void LCM_DisplayString_Boot(boolean sen_status);
pixus_mbed 0:411244c71423 18
pixus_mbed 0:411244c71423 19 };
pixus_mbed 0:411244c71423 20 #endif