<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://learn.sb-components.co.uk/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Yatin</id>
	<title>SB-Components Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://learn.sb-components.co.uk/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Yatin"/>
	<link rel="alternate" type="text/html" href="https://learn.sb-components.co.uk/Special:Contributions/Yatin"/>
	<updated>2026-04-05T18:20:22Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.1</generator>
	<entry>
		<id>https://learn.sb-components.co.uk/index.php?title=Microbit-Servo-Driver&amp;diff=750</id>
		<title>Microbit-Servo-Driver</title>
		<link rel="alternate" type="text/html" href="https://learn.sb-components.co.uk/index.php?title=Microbit-Servo-Driver&amp;diff=750"/>
		<updated>2021-06-25T08:51:53Z</updated>

		<summary type="html">&lt;p&gt;Yatin: /* Micro:Bit Servo Driver */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;large-8 column&amp;quot;&amp;gt;&lt;br /&gt;
== Micro:Bit Servo Driver ==&lt;br /&gt;
Micro:bit Servo Driver is a motor driver from which one can control up to 16 motors simultaneously. If you're building a robot with a lot of moving parts, or if you need to monitor a lot of servo motors with PWM yields, the microcontroller's limited PWM yields will be a big problem. The most important thing you can do to solve this problem is to obtain a 16-Channel 12-Bit PWM/Servo Driver.&lt;br /&gt;
&lt;br /&gt;
=== Features ===&lt;br /&gt;
* Adjustable frequency PWM up to about 1.6 KHz&lt;br /&gt;
* Up to 16-Channel servo/PWM outputs, 12-bit resolution for each channel (4096 scales)&lt;br /&gt;
* 3 pin connectors in groups of 4 so you can plug in 16 servos at once&lt;br /&gt;
* This board/chip uses an I2C 7-bit address&lt;br /&gt;
* Expansion Headers for easy connections&lt;br /&gt;
* I2C controlled and external power supply connector&lt;br /&gt;
* Compatible with Micro:bit and Micro:bit V2&lt;br /&gt;
&lt;br /&gt;
=== Specifications ===&lt;br /&gt;
* External Power supply: 5V OR 6V (Via power supply connector)&lt;br /&gt;
* Servo voltage: 5V&lt;br /&gt;
* Logic voltage: 3.3V&lt;br /&gt;
* Driver: PCA9685&lt;br /&gt;
* Control interface: I2C&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;large-4 column&amp;quot;&amp;gt;&lt;br /&gt;
[[File:Mbit_servo_driver.png|thumb|left|alt=Microbit ServoDriver.| Buy it From : ''[https://shop.sb-components.co.uk/products/16-channel-12-bit-servo-driver-i2c-interface-module-servo-driver-hat-for-micro-bit Click Here]'']]&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Pinout ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table class=&amp;quot;wikitable&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;th&amp;gt;PIN &amp;lt;/th&amp;gt; &amp;lt;th&amp;gt;micro:bit Pins&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt;VCC&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;Power (5V/6V) (Via External source)&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt;GND&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;Ground &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt;SDA&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;P20 &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt;SCL&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt;P19&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Programming ==&lt;br /&gt;
==== Drag and Drop ====&lt;br /&gt;
* Before starting, you need these components :&lt;br /&gt;
** Servo driver x 1&lt;br /&gt;
** Micro:Bit x 1&lt;br /&gt;
** Servo Motor x 1&lt;br /&gt;
** External Supply (6-12V) x 1&lt;br /&gt;
&lt;br /&gt;
* Connect micro:bit on stackable connector of Servo driver board as shown below.&lt;br /&gt;
&lt;br /&gt;
* Visit the official programming website of Micro:bit https://makecode.microbit.org/&lt;br /&gt;
&lt;br /&gt;
* Now create a new project by clicking on the &amp;quot;New project&amp;quot; tab and enter the name of your project.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;img src=&amp;quot;https://github.com/sbcshop/RFID-Expansion-For-Microbit/raw/main/images/makecode_microbit.PNG&amp;quot; width=&amp;quot;700&amp;quot; height=&amp;quot;700&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* A user needs to add an extension for Servo driver via clicking on the tab Advanced &amp;gt;&amp;gt; Extensions and enter the mentioned URL below in the search box.&lt;br /&gt;
https://github.com/sbcshop/pxt-servo-microbit&lt;br /&gt;
&lt;br /&gt;
&amp;lt;img src=&amp;quot;https://cdn.shopify.com/s/files/1/1217/2104/files/add_ext1.png&amp;quot; height=&amp;quot;700&amp;quot; width=&amp;quot;700&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Click on the Search button after entering the above URL, Now look for the search result to add the extension to the project(current).&lt;br /&gt;
[[File:Mbit_servo_driver_pca9685.PNG | 700px]]&lt;br /&gt;
&lt;br /&gt;
* Now you can Control your up to 16 servo motor by using servo motor driver Extension drag and drop blocks as shown in the below example. Once done with blocks, click on the download button to upload it to your microbit.&lt;br /&gt;
&lt;br /&gt;
[[File:Mbit_servo_driver_code.PNG| 700px]]&lt;br /&gt;
&lt;br /&gt;
* Connect Servo Motor on any pin ranging between 0-15, and connect external 6-12V power supply on Black terminal block as shown in below circuit.&lt;br /&gt;
&lt;br /&gt;
[[File:Mbit_servo_ckt.png | 700px]]&lt;br /&gt;
&lt;br /&gt;
== Resources ==&lt;/div&gt;</summary>
		<author><name>Yatin</name></author>
	</entry>
	<entry>
		<id>https://learn.sb-components.co.uk/index.php?title=1.28-round-lcd-breakout&amp;diff=735</id>
		<title>1.28-round-lcd-breakout</title>
		<link rel="alternate" type="text/html" href="https://learn.sb-components.co.uk/index.php?title=1.28-round-lcd-breakout&amp;diff=735"/>
		<updated>2021-06-24T09:53:25Z</updated>

		<summary type="html">&lt;p&gt;Yatin: /* PICO RP2040 (MicroPython) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;large-8 column&amp;quot;&amp;gt;&lt;br /&gt;
== 1.28&amp;quot; Round LCD Breakout ==&lt;br /&gt;
The 1.28&amp;quot; Round LCD Breakout is a 1.28-inch display breakout with 240 x 240 resolution, 65K RGB colours, and a clear and colourful displaying effect meant to help gadgets increase their interaction via SPI connection by providing a GPIO header for easy interface. The GC9A01 display driver and SPI interface are integrated into the 1.28&amp;quot; Round LCD Breakout, decreasing the number of IO pins required.&lt;br /&gt;
&lt;br /&gt;
=== Features ===&lt;br /&gt;
* 4-wire SPI Communication&lt;br /&gt;
* GPIO header for easy interfacing &lt;br /&gt;
* Cross-Platform compatibility&lt;br /&gt;
* 1.28” Round LCD&lt;br /&gt;
&lt;br /&gt;
=== Specifications ===&lt;br /&gt;
* Operating Voltage - 3.3 V&lt;br /&gt;
* Pixel Size - 0.135 × 0.135mm&lt;br /&gt;
* Board Dimension - 36mm x 44mm&lt;br /&gt;
* Pixels - 240×240 resolution&lt;br /&gt;
* Display Colour - 65K RGB&lt;br /&gt;
* Driver - GC9A01 &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;large-4 column&amp;quot;&amp;gt;&lt;br /&gt;
[[File:Round_lcd_breakout.png|thumb|left|alt=Pico 1.28 Round LCD Breakout| Buy it From : ''[https://shop.sb-components.co.uk/products/1-28-round-lcd-breakout Click Here]'']]&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Pinout ==&lt;br /&gt;
&amp;lt;table class=&amp;quot;wikitable&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;th&amp;gt;Round LCD Breakout&amp;lt;/th&amp;gt; &amp;lt;th&amp;gt;Description &amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; GND &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; Ground Supply &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; VCC &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; Power Supply 3.3V - 5V DC &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; DIN &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; Serial Data Input / Output &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; CLK &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; Serial Clock &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; CS &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; Chip select input pin (&amp;quot;Low&amp;quot; enable) &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; DC &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; Display data / Command selection pin &amp;lt;/br&amp;gt; DC='1': Display data. &amp;lt;/br&amp;gt; DC='0': Command data &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; RST &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; Reset Pin. Initialize the chip with a low input &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; BL &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; Blacklight Control. High: Blacklight on Low: Blacklight off. &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
==== Arduino ====&lt;br /&gt;
* [https://github.com/moononournation/Arduino_GFX '''Arduino Library for 1.28&amp;quot; Round LCD Breakout''']&lt;br /&gt;
&lt;br /&gt;
If you are using Arduino Ide, you can use the above library.&lt;br /&gt;
&lt;br /&gt;
==== PICO RP2040 (MicroPython) ====&lt;br /&gt;
*  Below components are required to run Pico RP2040 compatible boards :&lt;br /&gt;
** Raspberry Pi Pico x 1&lt;br /&gt;
** Pico 1.28&amp;quot; Round LCD Breakout x 1&lt;br /&gt;
** USB Cable x 1&lt;br /&gt;
&lt;br /&gt;
* Copy or clone code from Github.&lt;br /&gt;
https://github.com/sbcshop/1.28-Round-LCD-Breakout&lt;br /&gt;
&lt;br /&gt;
* Connect LCD breakout with Raspberry Pi Pico as shown in the below pinout.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table class=&amp;quot;wikitable&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;th&amp;gt;1.28&amp;quot; Round LCD Breakout &amp;lt;/th&amp;gt; &amp;lt;th&amp;gt;PICO Pins &amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; VCC &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; 3.3V / 5V &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; GND &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; GND &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; LCD DIN &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; GP11 &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; LCD CLK &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; GP10 &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; LCD DC &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; GP8 &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt;LCD CS&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; GP9 &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; LCD RST &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; GP12 &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; LCD BL &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; GP13 &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Press and hold  '''BOOTSEL''' pin of Raspberry Pi Pico and connect the USB cable, it will create a drive as RPI-RP2.&lt;br /&gt;
&lt;br /&gt;
* Now drag and drop or copy and paste '''firmware.uf2''' file from firmware folder to RPI-RP2 Drive. It will reboot your raspberry pi pico.&lt;br /&gt;
&lt;br /&gt;
* Open Thonny IDE and Choose interpreter as MicroPython (Raspberry Pi Pico).&lt;br /&gt;
[[File:Thonny-interpreter.PNG|600px]]&lt;br /&gt;
&lt;br /&gt;
* Now you can run example codes from the '''Pico_Example_mpy''' folder in Thonny Ide. For example, Open the '''hello.py''' file in thonny and click on the green play button to run this example.&lt;br /&gt;
[[File:Pico_Round_lcd_HAT_thonny.PNG]]&lt;br /&gt;
&lt;br /&gt;
It will print &amp;quot;Hello&amp;quot; on Round LCD. You can use the joystick to change the LCD color.&lt;br /&gt;
&lt;br /&gt;
==== Working Example ====&lt;br /&gt;
* This module was tested on Raspberry Pi Pico. You need to provide a SPI object and the pin to use for the DC pin of the screen.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import machine&lt;br /&gt;
import gc9a01&lt;br /&gt;
spi = SPI(1, baudrate=40000000, sck=Pin(10), mosi=Pin(11))&lt;br /&gt;
tft = gc9a01.GC9A01(spi, 240, 240, reset=Pin(12, Pin.OUT), cs=Pin(9, Pin.OUT), dc=Pin(8, Pin.OUT), backlight=Pin(13, Pin.OUT), rotation=0)&lt;br /&gt;
tft.init()&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Functions and Arguments ==== &lt;br /&gt;
* &amp;lt;source inline&amp;gt;  gc9a01.GC9A01(spi, width, height, reset, dc, cs, backlight, rotation, buffer_size) &amp;lt;/source&amp;gt;&lt;br /&gt;
required arguments:&lt;br /&gt;
&amp;lt;source&amp;gt;&lt;br /&gt;
`spi` spi device&lt;br /&gt;
  `width` display width&lt;br /&gt;
  `height` display height&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
optional args:&lt;br /&gt;
&amp;lt;source&amp;gt;&lt;br /&gt;
  `reset` reset pin&lt;br /&gt;
  `dc` dc pin&lt;br /&gt;
  `cs` cs pin&lt;br /&gt;
  `backlight` backlight pin&lt;br /&gt;
  `rotation` Orientation of display.&lt;br /&gt;
  `buffer_size` 0= buffer dynamically allocated and freed as needed.&lt;br /&gt;
&lt;br /&gt;
  Rotation | Orientation&lt;br /&gt;
  -------- | --------------------&lt;br /&gt;
     0     | 0 degrees&lt;br /&gt;
     1     | 90 degrees&lt;br /&gt;
     2     | 180 degrees&lt;br /&gt;
     3     | 270 degrees&lt;br /&gt;
     4     | 0 degrees mirrored&lt;br /&gt;
     5     | 90 degrees mirrored&lt;br /&gt;
     6     | 180 degrees mirrored&lt;br /&gt;
     7     | 270 degrees mirrored&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
If buffer_size is specified it must be large enough to contain the largest bitmap, font character, and/or JPG used (Rows * Columns *2 bytes). Specifying a buffer_size reserves memory for use by the driver otherwise, memory required is allocated and free dynamically as it is needed. Dynamic allocation can cause heap fragmentation so garbage collection (GC) should be enabled.&lt;br /&gt;
&lt;br /&gt;
'''This driver supports only 16bit colors in RGB565 notation.'''&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;source inline&amp;gt; GC9A01.on() &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Turn on the backlight pin if one was defined during init.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;source inline&amp;gt; GC9A01.off() &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Turn off the backlight pin if one was defined during init.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;source inline&amp;gt; GC9A01.pixel(x, y, color) &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Set the specified pixel to the given color.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;source inline&amp;gt; GC9A01.line(x0, y0, x1, y1, color) &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Draws a single line with the provided color from (x0, y0) to (x1, y1).&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;source inline&amp;gt; GC9A01.hline(x, y, length, color) &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Draws a single horizontal line with the provided color and length in pixels. Along with vline, this is a fast version with reduced number of SPI calls.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;source inline&amp;gt; GC9A01.vline(x, y, length, color) &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Draws a single horizontal line with the provided color and length in pixels.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;source inline&amp;gt; GC9A01.rect(x, y, width, height, color) &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Draws a rectangle from (x, y) with corresponding dimensions&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;source inline&amp;gt; GC9A01.fill_rect(x, y, width, height, color) &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fill a rectangle starting from (x, y) coordinates&lt;br /&gt;
&lt;br /&gt;
Source code credit: https://github.com/russhughes/gc9a01_mpy&lt;br /&gt;
&lt;br /&gt;
== Resources ==&lt;br /&gt;
&amp;lt;b&amp;gt; Github &amp;lt;/b&amp;gt;&lt;br /&gt;
* [https://github.com/sbcshop/1.28-Round-LCD-Breakout Source Code]&lt;/div&gt;</summary>
		<author><name>Yatin</name></author>
	</entry>
	<entry>
		<id>https://learn.sb-components.co.uk/index.php?title=1.28-round-lcd-breakout&amp;diff=734</id>
		<title>1.28-round-lcd-breakout</title>
		<link rel="alternate" type="text/html" href="https://learn.sb-components.co.uk/index.php?title=1.28-round-lcd-breakout&amp;diff=734"/>
		<updated>2021-06-24T09:52:53Z</updated>

		<summary type="html">&lt;p&gt;Yatin: /* PICO RP2040 (MicroPython) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;large-8 column&amp;quot;&amp;gt;&lt;br /&gt;
== 1.28&amp;quot; Round LCD Breakout ==&lt;br /&gt;
The 1.28&amp;quot; Round LCD Breakout is a 1.28-inch display breakout with 240 x 240 resolution, 65K RGB colours, and a clear and colourful displaying effect meant to help gadgets increase their interaction via SPI connection by providing a GPIO header for easy interface. The GC9A01 display driver and SPI interface are integrated into the 1.28&amp;quot; Round LCD Breakout, decreasing the number of IO pins required.&lt;br /&gt;
&lt;br /&gt;
=== Features ===&lt;br /&gt;
* 4-wire SPI Communication&lt;br /&gt;
* GPIO header for easy interfacing &lt;br /&gt;
* Cross-Platform compatibility&lt;br /&gt;
* 1.28” Round LCD&lt;br /&gt;
&lt;br /&gt;
=== Specifications ===&lt;br /&gt;
* Operating Voltage - 3.3 V&lt;br /&gt;
* Pixel Size - 0.135 × 0.135mm&lt;br /&gt;
* Board Dimension - 36mm x 44mm&lt;br /&gt;
* Pixels - 240×240 resolution&lt;br /&gt;
* Display Colour - 65K RGB&lt;br /&gt;
* Driver - GC9A01 &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;large-4 column&amp;quot;&amp;gt;&lt;br /&gt;
[[File:Round_lcd_breakout.png|thumb|left|alt=Pico 1.28 Round LCD Breakout| Buy it From : ''[https://shop.sb-components.co.uk/products/1-28-round-lcd-breakout Click Here]'']]&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Pinout ==&lt;br /&gt;
&amp;lt;table class=&amp;quot;wikitable&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;th&amp;gt;Round LCD Breakout&amp;lt;/th&amp;gt; &amp;lt;th&amp;gt;Description &amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; GND &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; Ground Supply &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; VCC &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; Power Supply 3.3V - 5V DC &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; DIN &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; Serial Data Input / Output &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; CLK &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; Serial Clock &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; CS &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; Chip select input pin (&amp;quot;Low&amp;quot; enable) &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; DC &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; Display data / Command selection pin &amp;lt;/br&amp;gt; DC='1': Display data. &amp;lt;/br&amp;gt; DC='0': Command data &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; RST &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; Reset Pin. Initialize the chip with a low input &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; BL &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; Blacklight Control. High: Blacklight on Low: Blacklight off. &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
==== Arduino ====&lt;br /&gt;
* [https://github.com/moononournation/Arduino_GFX '''Arduino Library for 1.28&amp;quot; Round LCD Breakout''']&lt;br /&gt;
&lt;br /&gt;
If you are using Arduino Ide, you can use the above library.&lt;br /&gt;
&lt;br /&gt;
==== PICO RP2040 (MicroPython) ====&lt;br /&gt;
*  Below components are required to run Pico RP2040 compatible boards :&lt;br /&gt;
** Raspberry Pi Pico X 1&lt;br /&gt;
** Pico 1.28&amp;quot; Round LCD Breakout X 1&lt;br /&gt;
** USB Cable X 1&lt;br /&gt;
&lt;br /&gt;
* Copy or clone code from Github.&lt;br /&gt;
https://github.com/sbcshop/1.28-Round-LCD-Breakout&lt;br /&gt;
&lt;br /&gt;
* Connect LCD breakout with Raspberry Pi Pico as shown in the below pinout.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table class=&amp;quot;wikitable&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;th&amp;gt;1.28&amp;quot; Round LCD Breakout &amp;lt;/th&amp;gt; &amp;lt;th&amp;gt;PICO Pins &amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; VCC &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; 3.3V / 5V &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; GND &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; GND &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; LCD DIN &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; GP11 &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; LCD CLK &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; GP10 &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; LCD DC &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; GP8 &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt;LCD CS&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; GP9 &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; LCD RST &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; GP12 &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; LCD BL &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; GP13 &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Press and hold  '''BOOTSEL''' pin of Raspberry Pi Pico and connect the USB cable, it will create a drive as RPI-RP2.&lt;br /&gt;
&lt;br /&gt;
* Now drag and drop or copy and paste '''firmware.uf2''' file from firmware folder to RPI-RP2 Drive. It will reboot your raspberry pi pico.&lt;br /&gt;
&lt;br /&gt;
* Open Thonny IDE and Choose interpreter as MicroPython (Raspberry Pi Pico).&lt;br /&gt;
[[File:Thonny-interpreter.PNG|600px]]&lt;br /&gt;
&lt;br /&gt;
* Now you can run example codes from the '''Pico_Example_mpy''' folder in Thonny Ide. For example, Open the '''hello.py''' file in thonny and click on the green play button to run this example.&lt;br /&gt;
[[File:Pico_Round_lcd_HAT_thonny.PNG]]&lt;br /&gt;
&lt;br /&gt;
It will print &amp;quot;Hello&amp;quot; on Round LCD. You can use the joystick to change the LCD color.&lt;br /&gt;
&lt;br /&gt;
==== Working Example ====&lt;br /&gt;
* This module was tested on Raspberry Pi Pico. You need to provide a SPI object and the pin to use for the DC pin of the screen.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import machine&lt;br /&gt;
import gc9a01&lt;br /&gt;
spi = SPI(1, baudrate=40000000, sck=Pin(10), mosi=Pin(11))&lt;br /&gt;
tft = gc9a01.GC9A01(spi, 240, 240, reset=Pin(12, Pin.OUT), cs=Pin(9, Pin.OUT), dc=Pin(8, Pin.OUT), backlight=Pin(13, Pin.OUT), rotation=0)&lt;br /&gt;
tft.init()&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Functions and Arguments ==== &lt;br /&gt;
* &amp;lt;source inline&amp;gt;  gc9a01.GC9A01(spi, width, height, reset, dc, cs, backlight, rotation, buffer_size) &amp;lt;/source&amp;gt;&lt;br /&gt;
required arguments:&lt;br /&gt;
&amp;lt;source&amp;gt;&lt;br /&gt;
`spi` spi device&lt;br /&gt;
  `width` display width&lt;br /&gt;
  `height` display height&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
optional args:&lt;br /&gt;
&amp;lt;source&amp;gt;&lt;br /&gt;
  `reset` reset pin&lt;br /&gt;
  `dc` dc pin&lt;br /&gt;
  `cs` cs pin&lt;br /&gt;
  `backlight` backlight pin&lt;br /&gt;
  `rotation` Orientation of display.&lt;br /&gt;
  `buffer_size` 0= buffer dynamically allocated and freed as needed.&lt;br /&gt;
&lt;br /&gt;
  Rotation | Orientation&lt;br /&gt;
  -------- | --------------------&lt;br /&gt;
     0     | 0 degrees&lt;br /&gt;
     1     | 90 degrees&lt;br /&gt;
     2     | 180 degrees&lt;br /&gt;
     3     | 270 degrees&lt;br /&gt;
     4     | 0 degrees mirrored&lt;br /&gt;
     5     | 90 degrees mirrored&lt;br /&gt;
     6     | 180 degrees mirrored&lt;br /&gt;
     7     | 270 degrees mirrored&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
If buffer_size is specified it must be large enough to contain the largest bitmap, font character, and/or JPG used (Rows * Columns *2 bytes). Specifying a buffer_size reserves memory for use by the driver otherwise, memory required is allocated and free dynamically as it is needed. Dynamic allocation can cause heap fragmentation so garbage collection (GC) should be enabled.&lt;br /&gt;
&lt;br /&gt;
'''This driver supports only 16bit colors in RGB565 notation.'''&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;source inline&amp;gt; GC9A01.on() &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Turn on the backlight pin if one was defined during init.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;source inline&amp;gt; GC9A01.off() &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Turn off the backlight pin if one was defined during init.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;source inline&amp;gt; GC9A01.pixel(x, y, color) &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Set the specified pixel to the given color.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;source inline&amp;gt; GC9A01.line(x0, y0, x1, y1, color) &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Draws a single line with the provided color from (x0, y0) to (x1, y1).&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;source inline&amp;gt; GC9A01.hline(x, y, length, color) &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Draws a single horizontal line with the provided color and length in pixels. Along with vline, this is a fast version with reduced number of SPI calls.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;source inline&amp;gt; GC9A01.vline(x, y, length, color) &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Draws a single horizontal line with the provided color and length in pixels.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;source inline&amp;gt; GC9A01.rect(x, y, width, height, color) &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Draws a rectangle from (x, y) with corresponding dimensions&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;source inline&amp;gt; GC9A01.fill_rect(x, y, width, height, color) &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fill a rectangle starting from (x, y) coordinates&lt;br /&gt;
&lt;br /&gt;
Source code credit: https://github.com/russhughes/gc9a01_mpy&lt;br /&gt;
&lt;br /&gt;
== Resources ==&lt;br /&gt;
&amp;lt;b&amp;gt; Github &amp;lt;/b&amp;gt;&lt;br /&gt;
* [https://github.com/sbcshop/1.28-Round-LCD-Breakout Source Code]&lt;/div&gt;</summary>
		<author><name>Yatin</name></author>
	</entry>
	<entry>
		<id>https://learn.sb-components.co.uk/index.php?title=1.28-round-lcd-breakout&amp;diff=732</id>
		<title>1.28-round-lcd-breakout</title>
		<link rel="alternate" type="text/html" href="https://learn.sb-components.co.uk/index.php?title=1.28-round-lcd-breakout&amp;diff=732"/>
		<updated>2021-06-24T09:21:38Z</updated>

		<summary type="html">&lt;p&gt;Yatin: /* Pinout */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;large-8 column&amp;quot;&amp;gt;&lt;br /&gt;
== 1.28&amp;quot; Round LCD Breakout ==&lt;br /&gt;
The 1.28&amp;quot; Round LCD Breakout is a 1.28-inch display breakout with 240 x 240 resolution, 65K RGB colours, and a clear and colourful displaying effect meant to help gadgets increase their interaction via SPI connection by providing a GPIO header for easy interface. The GC9A01 display driver and SPI interface are integrated into the 1.28&amp;quot; Round LCD Breakout, decreasing the number of IO pins required.&lt;br /&gt;
&lt;br /&gt;
=== Features ===&lt;br /&gt;
* 4-wire SPI Communication&lt;br /&gt;
* GPIO header for easy interfacing &lt;br /&gt;
* Cross-Platform compatibility&lt;br /&gt;
* 1.28” Round LCD&lt;br /&gt;
&lt;br /&gt;
=== Specifications ===&lt;br /&gt;
* Operating Voltage - 3.3 V&lt;br /&gt;
* Pixel Size - 0.135 × 0.135mm&lt;br /&gt;
* Board Dimension - 36mm x 44mm&lt;br /&gt;
* Pixels - 240×240 resolution&lt;br /&gt;
* Display Colour - 65K RGB&lt;br /&gt;
* Driver - GC9A01 &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;large-4 column&amp;quot;&amp;gt;&lt;br /&gt;
[[File:Round_lcd_breakout.png|thumb|left|alt=Pico 1.28 Round LCD Breakout| Buy it From : ''[https://shop.sb-components.co.uk/products/1-28-round-lcd-breakout Click Here]'']]&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Pinout ==&lt;br /&gt;
&amp;lt;table class=&amp;quot;wikitable&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;th&amp;gt;Round LCD Breakout&amp;lt;/th&amp;gt; &amp;lt;th&amp;gt;Description &amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; GND &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; Ground Supply &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; VCC &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; Power Supply 3.3V - 5V DC &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; DIN &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; Serial Data Input / Output &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; CLK &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; Serial Clock &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; CS &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; Chip select input pin (&amp;quot;Low&amp;quot; enable) &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; DC &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; Display data / Command selection pin &amp;lt;/br&amp;gt; DC='1': Display data. &amp;lt;/br&amp;gt; DC='0': Command data &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; RST &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; Reset Pin. Initialize the chip with a low input &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; BL &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; Blacklight Control. High: Blacklight on Low: Blacklight off. &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
==== Arduino ====&lt;br /&gt;
* [https://github.com/moononournation/Arduino_GFX '''Arduino Library for 1.28&amp;quot; Round LCD Breakout''']&lt;br /&gt;
&lt;br /&gt;
If you are using Arduino Ide, you can use the above library.&lt;br /&gt;
&lt;br /&gt;
==== PICO RP2040 (MicroPython) ====&lt;br /&gt;
*  For running this HAT, you require these components :&lt;br /&gt;
** Raspberry Pi Pico X 1&lt;br /&gt;
** Pico 1.28&amp;quot; Round LCD Breakout X 1&lt;br /&gt;
** USB Cable X 1&lt;br /&gt;
&lt;br /&gt;
* Copy or clone code from Github.&lt;br /&gt;
https://github.com/sbcshop/1.28-Round-LCD-Breakout&lt;br /&gt;
&lt;br /&gt;
* Connect LCD breakout with Raspberry Pi Pico as shown in the below pinout.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table class=&amp;quot;wikitable&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;th&amp;gt;1.28&amp;quot; Round LCD Breakout &amp;lt;/th&amp;gt; &amp;lt;th&amp;gt;PICO Pins &amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; VCC &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; 3.3V / 5V &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; GND &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; GND &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; LCD DIN &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; GP11 &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; LCD CLK &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; GP10 &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; LCD DC &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; GP8 &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt;LCD CS&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; GP9 &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; LCD RST &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; GP12 &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; LCD BL &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; GP13 &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Press and hold  '''BOOTSEL''' pin of Raspberry Pi Pico and connect the USB cable, it will create a drive as RPI-RP2.&lt;br /&gt;
&lt;br /&gt;
* Now drag and drog/copy '''firmware.uf2''' file from firmware folder to RPI-RP2 Drive. It will reboot your raspberry pi pico.&lt;br /&gt;
&lt;br /&gt;
* Open Thonny IDE and Choose interpreter as MicroPython (Raspberry Pi pico).&lt;br /&gt;
[[File:Thonny-interpreter.PNG|600px]]&lt;br /&gt;
&lt;br /&gt;
* Now you can run example codes from the '''Pico_Example_mpy''' folder in Thonny Ide. For example, Open the '''hello.py''' file in thonny and click on the green play button to run this example.&lt;br /&gt;
[[File:Pico_Round_lcd_HAT_thonny.PNG]]&lt;br /&gt;
&lt;br /&gt;
It will print &amp;quot;Hello&amp;quot; on Round LCD. You can use the joystick to change the LCD color.&lt;br /&gt;
&lt;br /&gt;
==== Working Example ====&lt;br /&gt;
* This module was tested on Raspberry Pi Pico. You need to provide a SPI object and the pin to use for the DC pin of the screen.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import machine&lt;br /&gt;
import gc9a01&lt;br /&gt;
spi = SPI(1, baudrate=40000000, sck=Pin(10), mosi=Pin(11))&lt;br /&gt;
tft = gc9a01.GC9A01(spi, 240, 240, reset=Pin(12, Pin.OUT), cs=Pin(9, Pin.OUT), dc=Pin(8, Pin.OUT), backlight=Pin(13, Pin.OUT), rotation=0)&lt;br /&gt;
tft.init()&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Functions and Arguments ==== &lt;br /&gt;
* &amp;lt;source inline&amp;gt;  gc9a01.GC9A01(spi, width, height, reset, dc, cs, backlight, rotation, buffer_size) &amp;lt;/source&amp;gt;&lt;br /&gt;
required arguments:&lt;br /&gt;
&amp;lt;source&amp;gt;&lt;br /&gt;
`spi` spi device&lt;br /&gt;
  `width` display width&lt;br /&gt;
  `height` display height&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
optional args:&lt;br /&gt;
&amp;lt;source&amp;gt;&lt;br /&gt;
  `reset` reset pin&lt;br /&gt;
  `dc` dc pin&lt;br /&gt;
  `cs` cs pin&lt;br /&gt;
  `backlight` backlight pin&lt;br /&gt;
  `rotation` Orientation of display.&lt;br /&gt;
  `buffer_size` 0= buffer dynamically allocated and freed as needed.&lt;br /&gt;
&lt;br /&gt;
  Rotation | Orientation&lt;br /&gt;
  -------- | --------------------&lt;br /&gt;
     0     | 0 degrees&lt;br /&gt;
     1     | 90 degrees&lt;br /&gt;
     2     | 180 degrees&lt;br /&gt;
     3     | 270 degrees&lt;br /&gt;
     4     | 0 degrees mirrored&lt;br /&gt;
     5     | 90 degrees mirrored&lt;br /&gt;
     6     | 180 degrees mirrored&lt;br /&gt;
     7     | 270 degrees mirrored&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
If buffer_size is specified it must be large enough to contain the largest bitmap, font character, and/or JPG used (Rows * Columns *2 bytes). Specifying a buffer_size reserves memory for use by the driver otherwise, memory required is allocated and free dynamically as it is needed. Dynamic allocation can cause heap fragmentation so garbage collection (GC) should be enabled.&lt;br /&gt;
&lt;br /&gt;
'''This driver supports only 16bit colors in RGB565 notation.'''&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;source inline&amp;gt; GC9A01.on() &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Turn on the backlight pin if one was defined during init.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;source inline&amp;gt; GC9A01.off() &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Turn off the backlight pin if one was defined during init.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;source inline&amp;gt; GC9A01.pixel(x, y, color) &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Set the specified pixel to the given color.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;source inline&amp;gt; GC9A01.line(x0, y0, x1, y1, color) &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Draws a single line with the provided color from (x0, y0) to (x1, y1).&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;source inline&amp;gt; GC9A01.hline(x, y, length, color) &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Draws a single horizontal line with the provided color and length in pixels. Along with vline, this is a fast version with reduced number of SPI calls.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;source inline&amp;gt; GC9A01.vline(x, y, length, color) &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Draws a single horizontal line with the provided color and length in pixels.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;source inline&amp;gt; GC9A01.rect(x, y, width, height, color) &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Draws a rectangle from (x, y) with corresponding dimensions&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;source inline&amp;gt; GC9A01.fill_rect(x, y, width, height, color) &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fill a rectangle starting from (x, y) coordinates&lt;br /&gt;
&lt;br /&gt;
Source code credit: https://github.com/russhughes/gc9a01_mpy&lt;br /&gt;
&lt;br /&gt;
== Resources ==&lt;br /&gt;
&amp;lt;b&amp;gt; Github &amp;lt;/b&amp;gt;&lt;br /&gt;
* [https://github.com/sbcshop/1.28-Round-LCD-Breakout Source Code]&lt;/div&gt;</summary>
		<author><name>Yatin</name></author>
	</entry>
	<entry>
		<id>https://learn.sb-components.co.uk/index.php?title=1.14-lcd-breakout&amp;diff=723</id>
		<title>1.14-lcd-breakout</title>
		<link rel="alternate" type="text/html" href="https://learn.sb-components.co.uk/index.php?title=1.14-lcd-breakout&amp;diff=723"/>
		<updated>2021-06-24T07:06:25Z</updated>

		<summary type="html">&lt;p&gt;Yatin: /* Functions and Arguments */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;large-8 column&amp;quot;&amp;gt;&lt;br /&gt;
== 1.14&amp;quot; LCD Breakout ==&lt;br /&gt;
1.14 inch LCD Breakout is a 1.14-inch display breakout with a resolution of 240 135 pixels, 65K RGB colours, and a crisp and colorful showing effect, built specifically for cross-platform to broaden its involvement via SPI communication by including a GPIO header. The ST7789 Driver and SPI Interface are included in the 1.14 Inch LCD Breakout, reducing the number of IO pins required.&lt;br /&gt;
&lt;br /&gt;
=== Features ===&lt;br /&gt;
* 4-wire SPI Communication&lt;br /&gt;
* Cross-Platform support&lt;br /&gt;
* SPI Interface&lt;br /&gt;
* 1.14 inch display&lt;br /&gt;
* Voltage Level Shifter&lt;br /&gt;
&lt;br /&gt;
=== Specifications ===&lt;br /&gt;
* Operating Voltage - 3.3 V / 5V&lt;br /&gt;
* Display Size - 24.91 × 14.86mm&lt;br /&gt;
* Pixels - 240×135 resolution&lt;br /&gt;
* Pixel Size - 0.1101 × 0.1035mm&lt;br /&gt;
* Display Colour - 65K RGB&lt;br /&gt;
* Display Driver -  ST7789&lt;br /&gt;
* Voltage Level Shifter - TXB0108PWR&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;large-4 column&amp;quot;&amp;gt;&lt;br /&gt;
[[File:1.14InchLCDBreakout.png|thumb|left|alt=1.14 Round LCD Breakout| Buy it From : ''[https://shop.sb-components.co.uk/products/1-14-inch-lcd-breakout Click Here]'']]&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Pinout ==&lt;br /&gt;
&amp;lt;table class=&amp;quot;wikitable&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;th&amp;gt;1.14&amp;quot; LCD Breakout&amp;lt;/th&amp;gt; &amp;lt;th&amp;gt;Description &amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; GND &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; Ground Supply &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; VCC &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; Power Supply 3.3V - 5V DC &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; DIN &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; Serial Data Input / Output &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; CLK &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; Serial Clock &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; CS &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; Chip select input pin (&amp;quot;Low&amp;quot; enable) &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; DC &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; Display data / Command selection pin &amp;lt;/br&amp;gt; DC='1': Display data. &amp;lt;/br&amp;gt; DC='0': Command data &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; RST &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; Reset Pin. Initialize the chip with a low input &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; BL &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; Blacklight Control. High: Blacklight on Low: Blacklight off. &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
==== Arduino ====&lt;br /&gt;
* [https://github.com/moononournation/Arduino_GFX '''Arduino Library for 1.14&amp;quot; LCD Breakout''']&lt;br /&gt;
&lt;br /&gt;
If you are using Arduino Ide, you can use the above library.&lt;br /&gt;
&lt;br /&gt;
==== PICO RP2040 (MicroPython) ====&lt;br /&gt;
*  For running this HAT, you require these components :&lt;br /&gt;
** Raspberry Pi Pico X 1&lt;br /&gt;
** 1.14&amp;quot; LCD Breakout X 1&lt;br /&gt;
** USB Cable X 1&lt;br /&gt;
&lt;br /&gt;
* Copy or clone code from Github.&lt;br /&gt;
https://github.com/sbcshop/1.14-LCD-Breakout&lt;br /&gt;
&lt;br /&gt;
* Connect 1.14 inch LCD breakout with Raspberry Pi Pico as shown in the below pinout.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table class=&amp;quot;wikitable&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;th&amp;gt;1.14&amp;quot; LCD Breakout &amp;lt;/th&amp;gt; &amp;lt;th&amp;gt;PICO Pins &amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; VCC &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; 3.3V / 5V &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; GND &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; GND &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; LCD DIN &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; GP11 &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; LCD CLK &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; GP10 &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; LCD DC &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; GP8 &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt;LCD CS&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; GP9 &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; LCD RST &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; GP12 &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; LCD BL &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; GP13 &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Press and hold  '''BOOTSEL''' pin of Raspberry Pi Pico and connect the USB cable, it will create a drive as RPI-RP2.&lt;br /&gt;
&lt;br /&gt;
* Now drag and drop or copy and paste '''firmware.uf2''' file from firmware folder to RPI-RP2 Drive. It will reboot your raspberry pi pico.&lt;br /&gt;
&lt;br /&gt;
* Open Thonny IDE and Choose interpreter as MicroPython (Raspberry Pi pico).&lt;br /&gt;
[[File:Thonny-interpreter.PNG|600px]]&lt;br /&gt;
&lt;br /&gt;
* Now you can run example codes from the '''Pico_Example_mpy''' folder in Thonny Ide. For example, Open the '''hello.py''' file in thonny and click on the green play button to run this example.&lt;br /&gt;
[[File:114_LCD_thonny_code.PNG]]&lt;br /&gt;
&lt;br /&gt;
It will print &amp;quot;Hello World!&amp;quot; on LCD.&lt;br /&gt;
&lt;br /&gt;
==== Working Example ====&lt;br /&gt;
* This module was tested on Raspberry Pi Pico. You need to provide a SPI object and the pin to use for the DC pin of the screen.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import machine&lt;br /&gt;
import st7789&lt;br /&gt;
spi = SPI(1, baudrate=40000000, sck=Pin(10), mosi=Pin(11))&lt;br /&gt;
tft = st7789.ST7789(spi, 135, 240, reset=Pin(12, Pin.OUT), cs=Pin(9, Pin.OUT), dc=Pin(8, Pin.OUT), backlight=Pin(13, Pin.OUT), rotation=3)&lt;br /&gt;
tft.init()&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Functions and Arguments ==== &lt;br /&gt;
* &amp;lt;source inline&amp;gt;  st7789.ST7789(spi, width, height, reset, dc, cs, backlight, rotation, buffer_size) &amp;lt;/source&amp;gt;&lt;br /&gt;
required arguments:&lt;br /&gt;
&amp;lt;source&amp;gt;&lt;br /&gt;
`spi` spi device&lt;br /&gt;
  `width` display width&lt;br /&gt;
  `height` display height&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
optional args:&lt;br /&gt;
&amp;lt;source&amp;gt;&lt;br /&gt;
  `reset` reset pin&lt;br /&gt;
  `dc` dc pin&lt;br /&gt;
  `cs` cs pin&lt;br /&gt;
  `backlight` backlight pin&lt;br /&gt;
  `rotation` 0-0 degrees, 1-90 degrees, 2-180 degrees, 3-270 degrees&lt;br /&gt;
  `buffer_size` 0= buffer dynamically allocated and freed as needed.&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If buffer_size is specified then it must be large enough to contain the largest bitmap, font character, and/or JPG used (Rows * Columns *2 bytes). Specifying a buffer_size reserves memory for use by the driver or else memory required for the data will be allocated dynamically as per the data size. Dynamic allocation can cause heap fragmentation so garbage collection (GC) should be enabled.&lt;br /&gt;
&lt;br /&gt;
'''This driver supports only 16bit colors in RGB565 notation.'''&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;source inline&amp;gt; ST7789.on() &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Turn on the backlight pin if one was defined during init.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;source inline&amp;gt; ST7789.off() &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Turn off the backlight pin if one was defined during init.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;source inline&amp;gt; ST7789.pixel(x, y, color) &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Set the specified pixel to the given color.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;source inline&amp;gt; ST7789.line(x0, y0, x1, y1, color) &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Draws a single line with the provided color from (x0, y0) to (x1, y1).&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;source inline&amp;gt; ST7789.hline(x, y, length, color) &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Draws a single horizontal line with the provided color and length in pixels. Along with vline, this is a fast version with reduced number of SPI calls.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;source inline&amp;gt; ST7789.vline(x, y, length, color) &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Draws a single horizontal line with the provided color and length in pixels.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;source inline&amp;gt; ST7789.rect(x, y, width, height, color) &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Draws a rectangle from (x, y) with corresponding dimensions&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;source inline&amp;gt; ST7789.fill_rect(x, y, width, height, color) &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fill a rectangle starting from (x, y) coordinates&lt;br /&gt;
&lt;br /&gt;
Source code credit: https://github.com/russhughes/st7789_mpy&lt;br /&gt;
&lt;br /&gt;
== Resources ==&lt;br /&gt;
&amp;lt;b&amp;gt; Github &amp;lt;/b&amp;gt;&lt;br /&gt;
* [https://github.com/sbcshop/1.14-LCD-Breakout Source Code]&lt;/div&gt;</summary>
		<author><name>Yatin</name></author>
	</entry>
	<entry>
		<id>https://learn.sb-components.co.uk/index.php?title=1.14-lcd-breakout&amp;diff=715</id>
		<title>1.14-lcd-breakout</title>
		<link rel="alternate" type="text/html" href="https://learn.sb-components.co.uk/index.php?title=1.14-lcd-breakout&amp;diff=715"/>
		<updated>2021-06-24T06:34:00Z</updated>

		<summary type="html">&lt;p&gt;Yatin: /* Pinout */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;large-8 column&amp;quot;&amp;gt;&lt;br /&gt;
== 1.14&amp;quot; LCD Breakout ==&lt;br /&gt;
1.14 inch LCD Breakout is a 1.14-inch display breakout with a resolution of 240 135 pixels, 65K RGB colours, and a crisp and colorful showing effect, built specifically for cross-platform to broaden its involvement via SPI communication by including a GPIO header. The ST7789 Driver and SPI Interface are included in the 1.14 Inch LCD Breakout, reducing the number of IO pins required.&lt;br /&gt;
&lt;br /&gt;
=== Features ===&lt;br /&gt;
* 4-wire SPI Communication&lt;br /&gt;
* Cross-Platform support&lt;br /&gt;
* SPI Interface&lt;br /&gt;
* 1.14 inch display&lt;br /&gt;
* Voltage Level Shifter&lt;br /&gt;
&lt;br /&gt;
=== Specifications ===&lt;br /&gt;
* Operating Voltage - 3.3 V / 5V&lt;br /&gt;
* Display Size - 24.91 × 14.86mm&lt;br /&gt;
* Pixels - 240×135 resolution&lt;br /&gt;
* Pixel Size - 0.1101 × 0.1035mm&lt;br /&gt;
* Display Colour - 65K RGB&lt;br /&gt;
* Display Driver -  ST7789&lt;br /&gt;
* Voltage Level Shifter - TXB0108PWR&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;large-4 column&amp;quot;&amp;gt;&lt;br /&gt;
[[File:1.14InchLCDBreakout.png|thumb|left|alt=1.14 Round LCD Breakout| Buy it From : ''[https://shop.sb-components.co.uk/products/1-14-inch-lcd-breakout Click Here]'']]&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Pinout ==&lt;br /&gt;
&amp;lt;table class=&amp;quot;wikitable&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;th&amp;gt;1.14&amp;quot; LCD Breakout&amp;lt;/th&amp;gt; &amp;lt;th&amp;gt;Description &amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; GND &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; Ground Supply &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; VCC &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; Power Supply 3.3V - 5V DC &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; DIN &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; Serial Data Input / Output &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; CLK &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; Serial Clock &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; CS &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; Chip select input pin (&amp;quot;Low&amp;quot; enable) &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; DC &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; Display data / Command selection pin &amp;lt;/br&amp;gt; DC='1': Display data. &amp;lt;/br&amp;gt; DC='0': Command data &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; RST &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; Reset Pin. Initialize the chip with a low input &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; BL &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; Blacklight Control. High: Blacklight on Low: Blacklight off. &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
==== Arduino ====&lt;br /&gt;
* [https://github.com/moononournation/Arduino_GFX '''Arduino Library for 1.14&amp;quot; LCD Breakout''']&lt;br /&gt;
&lt;br /&gt;
If you are using Arduino Ide, you can use the above library.&lt;br /&gt;
&lt;br /&gt;
==== PICO RP2040 (MicroPython) ====&lt;br /&gt;
*  For running this HAT, you require these components :&lt;br /&gt;
** Raspberry Pi Pico X 1&lt;br /&gt;
** 1.14&amp;quot; LCD Breakout X 1&lt;br /&gt;
** USB Cable X 1&lt;br /&gt;
&lt;br /&gt;
* Copy or clone code from Github.&lt;br /&gt;
https://github.com/sbcshop/1.14-LCD-Breakout&lt;br /&gt;
&lt;br /&gt;
* Connect 1.14 inch LCD breakout with Raspberry Pi Pico as shown in the below pinout.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table class=&amp;quot;wikitable&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;th&amp;gt;1.14&amp;quot; LCD Breakout &amp;lt;/th&amp;gt; &amp;lt;th&amp;gt;PICO Pins &amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; VCC &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; 3.3V / 5V &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; GND &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; GND &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; LCD DIN &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; GP11 &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; LCD CLK &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; GP10 &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; LCD DC &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; GP8 &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt;LCD CS&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; GP9 &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; LCD RST &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; GP12 &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; LCD BL &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; GP13 &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Press and hold  '''BOOTSEL''' pin of Raspberry Pi Pico and connect the USB cable, it will create a drive as RPI-RP2.&lt;br /&gt;
&lt;br /&gt;
* Now drag and drop or copy and paste '''firmware.uf2''' file from firmware folder to RPI-RP2 Drive. It will reboot your raspberry pi pico.&lt;br /&gt;
&lt;br /&gt;
* Open Thonny IDE and Choose interpreter as MicroPython (Raspberry Pi pico).&lt;br /&gt;
[[File:Thonny-interpreter.PNG|600px]]&lt;br /&gt;
&lt;br /&gt;
* Now you can run example codes from the '''Pico_Example_mpy''' folder in Thonny Ide. For example, Open the '''hello.py''' file in thonny and click on the green play button to run this example.&lt;br /&gt;
[[File:114_LCD_thonny_code.PNG]]&lt;br /&gt;
&lt;br /&gt;
It will print &amp;quot;Hello World!&amp;quot; on LCD.&lt;br /&gt;
&lt;br /&gt;
==== Working Example ====&lt;br /&gt;
* This module was tested on Raspberry Pi Pico. You need to provide a SPI object and the pin to use for the DC pin of the screen.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import machine&lt;br /&gt;
import st7789&lt;br /&gt;
spi = SPI(1, baudrate=40000000, sck=Pin(10), mosi=Pin(11))&lt;br /&gt;
tft = st7789.ST7789(spi, 135, 240, reset=Pin(12, Pin.OUT), cs=Pin(9, Pin.OUT), dc=Pin(8, Pin.OUT), backlight=Pin(13, Pin.OUT), rotation=3)&lt;br /&gt;
tft.init()&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Functions and Arguments ==== &lt;br /&gt;
* &amp;lt;source inline&amp;gt;  st7789.ST7789(spi, width, height, reset, dc, cs, backlight, rotation, buffer_size) &amp;lt;/source&amp;gt;&lt;br /&gt;
required arguments:&lt;br /&gt;
&amp;lt;source&amp;gt;&lt;br /&gt;
`spi` spi device&lt;br /&gt;
  `width` display width&lt;br /&gt;
  `height` display height&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
optional args:&lt;br /&gt;
&amp;lt;source&amp;gt;&lt;br /&gt;
  `reset` reset pin&lt;br /&gt;
  `dc` dc pin&lt;br /&gt;
  `cs` cs pin&lt;br /&gt;
  `backlight` backlight pin&lt;br /&gt;
  `rotation` 0-0 degrees, 1-90 degrees, 2-180 degrees, 3-270 degrees&lt;br /&gt;
  `buffer_size` 0= buffer dynamically allocated and freed as needed.&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If buffer_size is specified it must be large enough to contain the largest bitmap, font character, and/or JPG used (Rows * Columns *2 bytes). Specifying a buffer_size reserves memory for use by the driver otherwise, memory required is allocated and free dynamically as it is needed. Dynamic allocation can cause heap fragmentation so garbage collection (GC) should be enabled.&lt;br /&gt;
&lt;br /&gt;
'''This driver supports only 16bit colors in RGB565 notation.'''&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;source inline&amp;gt; ST7789.on() &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Turn on the backlight pin if one was defined during init.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;source inline&amp;gt; ST7789.off() &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Turn off the backlight pin if one was defined during init.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;source inline&amp;gt; ST7789.pixel(x, y, color) &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Set the specified pixel to the given color.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;source inline&amp;gt; ST7789.line(x0, y0, x1, y1, color) &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Draws a single line with the provided color from (x0, y0) to (x1, y1).&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;source inline&amp;gt; ST7789.hline(x, y, length, color) &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Draws a single horizontal line with the provided color and length in pixels. Along with vline, this is a fast version with reduced number of SPI calls.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;source inline&amp;gt; ST7789.vline(x, y, length, color) &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Draws a single horizontal line with the provided color and length in pixels.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;source inline&amp;gt; ST7789.rect(x, y, width, height, color) &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Draws a rectangle from (x, y) with corresponding dimensions&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;source inline&amp;gt; ST7789.fill_rect(x, y, width, height, color) &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fill a rectangle starting from (x, y) coordinates&lt;br /&gt;
&lt;br /&gt;
Source code credit: https://github.com/russhughes/st7789_mpy&lt;br /&gt;
&lt;br /&gt;
== Resources ==&lt;br /&gt;
&amp;lt;b&amp;gt; Github &amp;lt;/b&amp;gt;&lt;br /&gt;
* [https://github.com/sbcshop/1.14-LCD-Breakout Source Code]&lt;/div&gt;</summary>
		<author><name>Yatin</name></author>
	</entry>
	<entry>
		<id>https://learn.sb-components.co.uk/index.php?title=1.14-lcd-breakout&amp;diff=714</id>
		<title>1.14-lcd-breakout</title>
		<link rel="alternate" type="text/html" href="https://learn.sb-components.co.uk/index.php?title=1.14-lcd-breakout&amp;diff=714"/>
		<updated>2021-06-24T06:33:18Z</updated>

		<summary type="html">&lt;p&gt;Yatin: /* PICO RP2040 (MicroPython) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;large-8 column&amp;quot;&amp;gt;&lt;br /&gt;
== 1.14&amp;quot; LCD Breakout ==&lt;br /&gt;
1.14 inch LCD Breakout is a 1.14-inch display breakout with a resolution of 240 135 pixels, 65K RGB colours, and a crisp and colorful showing effect, built specifically for cross-platform to broaden its involvement via SPI communication by including a GPIO header. The ST7789 Driver and SPI Interface are included in the 1.14 Inch LCD Breakout, reducing the number of IO pins required.&lt;br /&gt;
&lt;br /&gt;
=== Features ===&lt;br /&gt;
* 4-wire SPI Communication&lt;br /&gt;
* Cross-Platform support&lt;br /&gt;
* SPI Interface&lt;br /&gt;
* 1.14 inch display&lt;br /&gt;
* Voltage Level Shifter&lt;br /&gt;
&lt;br /&gt;
=== Specifications ===&lt;br /&gt;
* Operating Voltage - 3.3 V / 5V&lt;br /&gt;
* Display Size - 24.91 × 14.86mm&lt;br /&gt;
* Pixels - 240×135 resolution&lt;br /&gt;
* Pixel Size - 0.1101 × 0.1035mm&lt;br /&gt;
* Display Colour - 65K RGB&lt;br /&gt;
* Display Driver -  ST7789&lt;br /&gt;
* Voltage Level Shifter - TXB0108PWR&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;large-4 column&amp;quot;&amp;gt;&lt;br /&gt;
[[File:1.14InchLCDBreakout.png|thumb|left|alt=1.14 Round LCD Breakout| Buy it From : ''[https://shop.sb-components.co.uk/products/1-14-inch-lcd-breakout Click Here]'']]&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Pinout ==&lt;br /&gt;
&amp;lt;table class=&amp;quot;wikitable&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;th&amp;gt;1.14&amp;quot; LCD Breakout&amp;lt;/th&amp;gt; &amp;lt;th&amp;gt;Description &amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; GND &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; Ground Supply &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; VCC &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; Power Supply 3.3V - 5V DC &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; DIN &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; Serial Data Input / Outout &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; CLK &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; Serial Clock &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; CS &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; Chip select input pin (&amp;quot;Low&amp;quot; enable) &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; DC &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; Display data / Command selection pin &amp;lt;/br&amp;gt; DC='1': Display data. &amp;lt;/br&amp;gt; DC='0': Command data &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; RST &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; Reset Pin. Initialize the chip with a low input &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; BL &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; Blacklight Control. High: Blacklight on Low: Blacklight off. &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
==== Arduino ====&lt;br /&gt;
* [https://github.com/moononournation/Arduino_GFX '''Arduino Library for 1.14&amp;quot; LCD Breakout''']&lt;br /&gt;
&lt;br /&gt;
If you are using Arduino Ide, you can use the above library.&lt;br /&gt;
&lt;br /&gt;
==== PICO RP2040 (MicroPython) ====&lt;br /&gt;
*  For running this HAT, you require these components :&lt;br /&gt;
** Raspberry Pi Pico X 1&lt;br /&gt;
** 1.14&amp;quot; LCD Breakout X 1&lt;br /&gt;
** USB Cable X 1&lt;br /&gt;
&lt;br /&gt;
* Copy or clone code from Github.&lt;br /&gt;
https://github.com/sbcshop/1.14-LCD-Breakout&lt;br /&gt;
&lt;br /&gt;
* Connect 1.14 inch LCD breakout with Raspberry Pi Pico as shown in the below pinout.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table class=&amp;quot;wikitable&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;th&amp;gt;1.14&amp;quot; LCD Breakout &amp;lt;/th&amp;gt; &amp;lt;th&amp;gt;PICO Pins &amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; VCC &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; 3.3V / 5V &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; GND &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; GND &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; LCD DIN &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; GP11 &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; LCD CLK &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; GP10 &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; LCD DC &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; GP8 &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt;LCD CS&amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; GP9 &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; LCD RST &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; GP12 &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt; &amp;lt;td&amp;gt; LCD BL &amp;lt;/td&amp;gt; &amp;lt;td&amp;gt; GP13 &amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Press and hold  '''BOOTSEL''' pin of Raspberry Pi Pico and connect the USB cable, it will create a drive as RPI-RP2.&lt;br /&gt;
&lt;br /&gt;
* Now drag and drop or copy and paste '''firmware.uf2''' file from firmware folder to RPI-RP2 Drive. It will reboot your raspberry pi pico.&lt;br /&gt;
&lt;br /&gt;
* Open Thonny IDE and Choose interpreter as MicroPython (Raspberry Pi pico).&lt;br /&gt;
[[File:Thonny-interpreter.PNG|600px]]&lt;br /&gt;
&lt;br /&gt;
* Now you can run example codes from the '''Pico_Example_mpy''' folder in Thonny Ide. For example, Open the '''hello.py''' file in thonny and click on the green play button to run this example.&lt;br /&gt;
[[File:114_LCD_thonny_code.PNG]]&lt;br /&gt;
&lt;br /&gt;
It will print &amp;quot;Hello World!&amp;quot; on LCD.&lt;br /&gt;
&lt;br /&gt;
==== Working Example ====&lt;br /&gt;
* This module was tested on Raspberry Pi Pico. You need to provide a SPI object and the pin to use for the DC pin of the screen.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import machine&lt;br /&gt;
import st7789&lt;br /&gt;
spi = SPI(1, baudrate=40000000, sck=Pin(10), mosi=Pin(11))&lt;br /&gt;
tft = st7789.ST7789(spi, 135, 240, reset=Pin(12, Pin.OUT), cs=Pin(9, Pin.OUT), dc=Pin(8, Pin.OUT), backlight=Pin(13, Pin.OUT), rotation=3)&lt;br /&gt;
tft.init()&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Functions and Arguments ==== &lt;br /&gt;
* &amp;lt;source inline&amp;gt;  st7789.ST7789(spi, width, height, reset, dc, cs, backlight, rotation, buffer_size) &amp;lt;/source&amp;gt;&lt;br /&gt;
required arguments:&lt;br /&gt;
&amp;lt;source&amp;gt;&lt;br /&gt;
`spi` spi device&lt;br /&gt;
  `width` display width&lt;br /&gt;
  `height` display height&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
optional args:&lt;br /&gt;
&amp;lt;source&amp;gt;&lt;br /&gt;
  `reset` reset pin&lt;br /&gt;
  `dc` dc pin&lt;br /&gt;
  `cs` cs pin&lt;br /&gt;
  `backlight` backlight pin&lt;br /&gt;
  `rotation` 0-0 degrees, 1-90 degrees, 2-180 degrees, 3-270 degrees&lt;br /&gt;
  `buffer_size` 0= buffer dynamically allocated and freed as needed.&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If buffer_size is specified it must be large enough to contain the largest bitmap, font character, and/or JPG used (Rows * Columns *2 bytes). Specifying a buffer_size reserves memory for use by the driver otherwise, memory required is allocated and free dynamically as it is needed. Dynamic allocation can cause heap fragmentation so garbage collection (GC) should be enabled.&lt;br /&gt;
&lt;br /&gt;
'''This driver supports only 16bit colors in RGB565 notation.'''&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;source inline&amp;gt; ST7789.on() &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Turn on the backlight pin if one was defined during init.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;source inline&amp;gt; ST7789.off() &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Turn off the backlight pin if one was defined during init.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;source inline&amp;gt; ST7789.pixel(x, y, color) &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Set the specified pixel to the given color.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;source inline&amp;gt; ST7789.line(x0, y0, x1, y1, color) &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Draws a single line with the provided color from (x0, y0) to (x1, y1).&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;source inline&amp;gt; ST7789.hline(x, y, length, color) &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Draws a single horizontal line with the provided color and length in pixels. Along with vline, this is a fast version with reduced number of SPI calls.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;source inline&amp;gt; ST7789.vline(x, y, length, color) &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Draws a single horizontal line with the provided color and length in pixels.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;source inline&amp;gt; ST7789.rect(x, y, width, height, color) &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Draws a rectangle from (x, y) with corresponding dimensions&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;source inline&amp;gt; ST7789.fill_rect(x, y, width, height, color) &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fill a rectangle starting from (x, y) coordinates&lt;br /&gt;
&lt;br /&gt;
Source code credit: https://github.com/russhughes/st7789_mpy&lt;br /&gt;
&lt;br /&gt;
== Resources ==&lt;br /&gt;
&amp;lt;b&amp;gt; Github &amp;lt;/b&amp;gt;&lt;br /&gt;
* [https://github.com/sbcshop/1.14-LCD-Breakout Source Code]&lt;/div&gt;</summary>
		<author><name>Yatin</name></author>
	</entry>
	<entry>
		<id>https://learn.sb-components.co.uk/index.php?title=Round-LCD-HAT&amp;diff=97</id>
		<title>Round-LCD-HAT</title>
		<link rel="alternate" type="text/html" href="https://learn.sb-components.co.uk/index.php?title=Round-LCD-HAT&amp;diff=97"/>
		<updated>2021-05-04T11:21:58Z</updated>

		<summary type="html">&lt;p&gt;Yatin: Created page with &amp;quot;&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt;   &amp;lt;div class=&amp;quot;large-8 column&amp;quot;&amp;gt; == Round LCD HAT == Round LCD HAT is a 1.28-inch display expansion board module of 240×240 resolution, 65K RGB colors, clear...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;row&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;large-8 column&amp;quot;&amp;gt;&lt;br /&gt;
== Round LCD HAT ==&lt;br /&gt;
Round LCD HAT is a 1.28-inch display expansion board module of 240×240 resolution, 65K RGB colors, clear and colorful displaying effect, with a joystick, designed for Raspberry Pi to expand its engagement via SPI communication by providing standard 40 pins GPIO interface. The Round LCD HAT comes with an embedded GC9A01 Driver and SPI Interface that minimize the required IO pins. It is designed with a 5-input Joystick that will be internally connected to the Round LCD HAT via a stackable GPIO connector header.&lt;br /&gt;
&lt;br /&gt;
=== Features ===&lt;br /&gt;
&amp;lt;li&amp;gt; 240 x 240 Resolution &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; 32.4mm Diameter &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; IPS Display Panel &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; GC9A01 Driver &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Raspberry Pi series compatibility  &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; 4-wire SPI Communication &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Standard Raspberry Pi 40 Pins GPIO &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; 4 directions + attached band Central press button Joystick Control  &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Specifications ===&lt;br /&gt;
&amp;lt;li&amp;gt; Operating Voltage - 3.3 V &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Pixel Size - 0.135 × 0.135mm  &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Board Dimension - 56mm × 65mm &amp;lt;/li&amp;gt; &lt;br /&gt;
&amp;lt;li&amp;gt; Pixels - 240×240 resolution &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Display Colour - 65K RGB &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Driver - GC9A01  &amp;lt;/li&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;large-4 column&amp;quot;&amp;gt;&lt;br /&gt;
[[File:Pico_Breadboard.png]]&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Pinout ==&lt;br /&gt;
[[File:Pico_Breadboard_Pinout.png]]&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
==== MicroPython ====&lt;br /&gt;
&amp;lt;li&amp;gt; Connect Raspberry Pi Pico on female header of Pico Breadboard Kit. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Connect USB cable on Raspberry Pi Pico USB port. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Use jumper cables to connect Switches , Led's and Buzzer with Raspberry Pi Pico GPIO headers. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Now use example code &amp;quot;Test.py&amp;quot; from pico breadboard kit's github repository in any micropython supported ide (preferred thonny ide).&amp;lt;li&amp;gt;&lt;br /&gt;
Source code : https://github.com/sbcshop/Raspberry-Pi-Pico-Breadboard-Kit&lt;br /&gt;
&amp;lt;li&amp;gt; Copy paste code in ide and choose interpreter as MicroPython (Raspberry Pi pico). &amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Thonny-interpreter.PNG|600px]]&lt;br /&gt;
&amp;lt;li&amp;gt; Click on green play button to run example on Pico Breadboard Kit. &amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Thonny_play.PNG]]&lt;br /&gt;
&lt;br /&gt;
== Resources ==&lt;/div&gt;</summary>
		<author><name>Yatin</name></author>
	</entry>
</feed>