- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Good Afternoon, I'm trying to create an LCD oscilloscope using the psoc 5lp-059 for a class project. I'm looking for an LCD screen to utilize. I was told that a Hitachi 44780 would work well with the psoc set up. I would like to make an oscilloscope that receives a signal and then sample it to recreate the signal on the LCD screen. Basically I'm trying to create a do it yourself solder oscilloscope kit, but the main cognitive component would be the psoc. Any advice to where would I start? I was looking at the data sheets and was thinking of using ADC del sig to sample the store the data in a register. Then utilize a DMA to create a ping pong buffer then send that data out to a pin to run the LCD screen. Would this be a correct way to approach it?
Regards
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Attached is a sample project using ILI9341 library I ported from mbed to PSoC 4 and now to PSoC 5LP.
At first I used this library for my first posting sample last year.
I'm using,
Adafruit 2.8" TFT Touch Shield.
https://www.adafruit.com/product/1651
But I hope that it will work with SPI driven ILI9341 TFTs...
Schematic
In the TFT.h there is a list of available APIs. (Note: Not all of them has been tested)
====================
void TFT_Init(void) ;
void TFT_BackLight(int mode) ; /* 0: off 1: on */
void TFT_BusEnable(int mode) ;
void TFT_window(int x, int y, int w, int h) ;
void TFT_pixel(int x, int y, unsigned short color) ;
void TFT_WindowMax(void) ;
void TFT_window_pushpixel(unsigned short color) ;
void TFT_window_pushpixelN(unsigned short color, unsigned int count) ;
void TFT_cls(void) ;
void TFT_set_orientation(int orientation) ;
void TFT_FastWindow(int mode) ;
int TFT_sizeX(void) ;
int TFT_sizeY(void) ;
int TFT_width() ;
int TFT_height() ;
void TFT_foreground(unsigned short fg) ;
unsigned short TFT_get_foreground(void) ;
void TFT_background(unsigned short bg) ;
unsigned short TFT_get_background(void) ;
void TFT_circle(int x, int y, int r, unsigned short color) ;
void TFT_fillcircle(int x, int y, int r, unsigned short color) ;
void TFT_line(int x0, int y0, int x1, int y1, unsigned short color) ;
void TFT_hline(int x0, int x1, int y, unsigned short color) ;
void TFT_vline(int x, int y0, int y1, unsigned short color) ;
void TFT_rect(int x0, int y0, int x1, int y1, unsigned short color) ;
void TFT_fillrect(int x0, int y0, int x1, int y1, unsigned short color) ;
void TFT_locate(int x, int y) ;
int TFT_putc(int value) ;
void TFT_character(int x, int y, int c) ;
void TFT_putstr(char *str) ;
void TFT_Bitmap(int x, int y, int w, int h, unsigned char *bitmap) ;
// void TFT_Bitmap_BW(Bitmap_s bm, int x, int y) ;
// int TFT_BMP_16(int x, int y, const char *Name_BMP) ;
void TFT_set_font(const unsigned char* f ) ;
====================
moto
P.S. Long ago, I wrote an oscilloscope program in mbed, but have not written one for PSoC, yet.
oscilloscope - A simple oscilloscope using Adafruit 2.8" TFT w... | Mbed
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In my opinion, using a Graphics LCD would be better for an oscilloscope than the alphanumeric dot-matrix Hitachi 44780 LCD. If you proceed with Graphics LCD, we have the GraphicsLCDIntf component which makes it easier to interface. Else for the Hitachi LCD you can use the Character LCD component for interfacing.
Here are some example projects you could use to get started with this:
(1) PSoC 4: Basic LCD Display - Hackster.io
(2) Character LCD (mp) Multi-Port
(3) Character LCD with 4 Data Bits - Hackster.io
(4) Cypress PSoC 5 with monochromatic 128×64 LCD « Embedded Systems
(5) GLCD Interface in PSoC4 - Hackster.io
ADC - DMA approach seems good. Go ahead
Regards,
Dheeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
fral,
There are several PSoC projects based on ili9341 GLCD. E.g. this one:
Any tips on optimising, i.e. speeding up ILI9341 driver for 2.2" TFT 300x240 screen
Search Cypress forums for "ili9341". This is sharp low-cost screen, which may be ok for such project.
ILI9341 with DMA and Optimization -O1 - YouTube
Optimized ili9341 LCD driver about 100ms fill 30Mhz SPI - YouTube
/odissey1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi fral,
some time ago I developed a custom component in PSoC Creator for the ILI9341. You can find all the required code, together with some examples, on GitHub at this link: https://github.com/dado93/PSoC-ILI9341
I would be very happy if you would like to improve the exisiting code.
Davide
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Attached is a sample project using ILI9341 library I ported from mbed to PSoC 4 and now to PSoC 5LP.
At first I used this library for my first posting sample last year.
I'm using,
Adafruit 2.8" TFT Touch Shield.
https://www.adafruit.com/product/1651
But I hope that it will work with SPI driven ILI9341 TFTs...
Schematic
In the TFT.h there is a list of available APIs. (Note: Not all of them has been tested)
====================
void TFT_Init(void) ;
void TFT_BackLight(int mode) ; /* 0: off 1: on */
void TFT_BusEnable(int mode) ;
void TFT_window(int x, int y, int w, int h) ;
void TFT_pixel(int x, int y, unsigned short color) ;
void TFT_WindowMax(void) ;
void TFT_window_pushpixel(unsigned short color) ;
void TFT_window_pushpixelN(unsigned short color, unsigned int count) ;
void TFT_cls(void) ;
void TFT_set_orientation(int orientation) ;
void TFT_FastWindow(int mode) ;
int TFT_sizeX(void) ;
int TFT_sizeY(void) ;
int TFT_width() ;
int TFT_height() ;
void TFT_foreground(unsigned short fg) ;
unsigned short TFT_get_foreground(void) ;
void TFT_background(unsigned short bg) ;
unsigned short TFT_get_background(void) ;
void TFT_circle(int x, int y, int r, unsigned short color) ;
void TFT_fillcircle(int x, int y, int r, unsigned short color) ;
void TFT_line(int x0, int y0, int x1, int y1, unsigned short color) ;
void TFT_hline(int x0, int x1, int y, unsigned short color) ;
void TFT_vline(int x, int y0, int y1, unsigned short color) ;
void TFT_rect(int x0, int y0, int x1, int y1, unsigned short color) ;
void TFT_fillrect(int x0, int y0, int x1, int y1, unsigned short color) ;
void TFT_locate(int x, int y) ;
int TFT_putc(int value) ;
void TFT_character(int x, int y, int c) ;
void TFT_putstr(char *str) ;
void TFT_Bitmap(int x, int y, int w, int h, unsigned char *bitmap) ;
// void TFT_Bitmap_BW(Bitmap_s bm, int x, int y) ;
// int TFT_BMP_16(int x, int y, const char *Name_BMP) ;
void TFT_set_font(const unsigned char* f ) ;
====================
moto
P.S. Long ago, I wrote an oscilloscope program in mbed, but have not written one for PSoC, yet.
oscilloscope - A simple oscilloscope using Adafruit 2.8" TFT w... | Mbed