RA8875 graphic cursor?

MrCanvas

Well-known member
Hi,

Has anyone been able to implement the "graphic cursor" (i.e hardware generated) on the RA8875? It looks to me like this feature is not fully implemented in the standard library (RA8875.h in Teensyduino), maybe I am not reading it right.

Currently I am using RA8875 layers to display mouse pointers as custom characters. Layers make things very simple however limits the color depth to 8 bit which is annoying.

This is the project, if context is needed: https://github.com/canvasus/CreatorMaster2k

Cheers, Daniel
 
Has anyone been able to implement the "graphic cursor" (i.e hardware generated) on the RA8875? It looks to me like this feature is not fully implemented in the standard library (RA8875.h in Teensyduino), maybe I am not reading it right.

Just doing a cursory review there are a couple of commands that pertain to the enabling the cursor.

1.
Code:
showCursor(enum RA8875tcursor c,bool blink)
and
2.
Code:
setCursorBlinkRate(uint8_t rate)

showCursor takes two parameters:
enum RA8875tcursor c: can be 0, 1, 2, or 3 which corresponds to NOCURSOR=0,IBEAM,UNDER,BLOCK cursor types
blink: true or false if you want to blink the cursor.

The blink rate can be set using the setCursorBlinkRate command and takes 0-255.

Hope that helps. Haven't really tried it so let us know if it works
 
Thanks, however I think those functions refer to what the RA8875 datasheet calls "Font Write Cursor" and not the "Graphic Cursor". The graphic one seems to be what I want to make a usable mouse pointer as it uses a 32x32 bitmap.
 
You are probably right about those methods. I have not played with the RA8875 for awhile now. And I have not done anything with the graphic cursors. Hopefully someone who uses these displays, will chime in.


I believe the methods those are:
Code:
	void 		setGraphicCursor(uint8_t cur);//0...7 Select a custom graphic cursor (you should upload first)
	void 		showGraphicCursor(boolean cur);//show graphic cursor

As for how to upload... I am guessing that you need to do something to fill in the 32x32 area.
Probably by setting the destination, like maybe this register?
Screenshot.png
 
Ok thanks for checking. I started working on some additional low level methods to upload the cursor but atm the screen is not cooperating. I am thinking maybe this is not in the library for a reason...

I could definitely live with the 256 color limitation that comes with using layers. Its just that the color palette with "RGB332" is a bit funky:

RA8875_8bit.jpg
 
Last edited:
Sorry, have no idea how hard it might be to make the graphic cursors to work. Or if there was some hardware reason, that it was not done.

I see the registers are defined but commented out in the header file:
Code:
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//                            Graphic Cursor Setting Registers
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//#define RA8875_GCHP0            	  0x80//Graphic Cursor Horizontal Position Register 0
//#define RA8875_GCHP1            	  0x81//Graphic Cursor Horizontal Position Register 1
//#define RA8875_GCVP0            	  0x82//Graphic Cursor Vertical Position Register 0
//#define RA8875_GCVP1            	  0x83//Graphic Cursor Vertical Position Register 0
//#define RA8875_GCC0            	      0x84//Graphic Cursor Color 0
//#define RA8875_GCC1            	      0x85//Graphic Cursor Color 1
 
Back
Top