Search Forum.. 

Digole Serial Read Touch 2.6'' With Python


Greetings to all
I am working with a Digole 2.6'' v3.3B, with a beaglebone Green Wireless hardware, the port conection is Uart at 9600. I am using
a lib created for But this lib doesn´t work with touch functions.
I do some extra function for support the oled touch as a manual say.
I do the function "readClick"  and return the position of the click display:
def readClick( self ):
        X = struct.unpack("!h",[0]
        Y = struct.unpack("!h",[0]
        return int(X), int(Y) 
 but sometimes, the digole (Always on the startup on main ) print me a value automatical that is not correct, even without touching the display
 This value  in integer format is:
 2016-09-02 13:34:19,478 DEBUG (178, -20)
 In hex/binary is:
 2016-09-02 13:32:38,941 DEBUG ('0xb2', '-0x14')
The question is : What is this mensage ?
its a buffer garbage ?its a result of timeout ? 
A lot of thanks 

RE: Digole Serial Read Touch 2.6'' With Python

 This may because of the master controller lost the "Synchronization" with the module.

RE: Digole Serial Read Touch 2.6'' With Python

 Hi Services


I made the connection with the Penirq and valid state before making reading "readClick". I've also added the time.sleep, it is now a little more stable
Reading the forum I found an interesting link:
The discussion is similar, but the last post is the most interesting:

RE:New touch-only display readClick() problems

Yes, you are right, if you issued read pen touched command, the module will stop run any other commands (but can still receive commands), this is correct action.

If you do hardware reset on your master controller, the Digole module will not be reseted, but there is a hardware reset pin on the module that Digole didn't publish it: there is a push button footprint on the back of PCB, this is the hardware reset button, if you connect the lower pin to GND, the digole module will be reset.

Where is the hidden "Pin" that allows you to reset the display when the driver performs a reboot? could post a photo?
The models I have are:
2.6 "Serial: UART / I2C / SPI TFT 320x240 Super IPS + 16MB Flash With Touchscreen Module DS320240CIPS-66TF (CN)
A lot of thanks



RE: Digole Serial Read Touch 2.6'' With Python

I'm using the very similar 2.4'' display that is controlled by a PIC18P26K20 micontroller which can be seen on the back of the module PCB. This board has a set of 2 x 16 PCB pads arranged so that a temporary connector may be clipped onto the board for programming and tesing purposes at the Digole factory. Apparently, ever pin from the PIC is brought out to the test connector pads.

A quick look at the spec sheet for this 28-pin PIC package shows that pin 1 for this IC is "MCLR", short for "Master Clear" which is the reset pin I think you are looking for. I have found no PCB pads for an actual reset switch or even simple PCB pads large enough to solder typical signal wires.

Like you, I am disappointed because this module has no Reset port pin on its interface. Another huge deficiency is that there is no interface pin that indicates when the PIC controller has finished rendering the last command sent to it.

However, with a little inginuity and some delicate soldering work I believe a wire can be soldered to Pin 1 of the test/programming connector so that the module may be reset at will with either a mechanical switch or by controller command.

Like you, I am using a Python library (written by myself) to test the board using its UART interface through a USB-to_UART(TTL 5 volt) adapter board connected directly to the display. This set up is far more efficient for programming the LCD module.

I into to switch to a USB-to-I2C adapter module that also has a few GPIO pins that can be controlled by the computer. This would be perfect for cntrolling the reset line on the PIC microcontroller. See the adapter at

I have seen no good reason to use the SPI inteface option as the PIC controlling the LCD is relatively slow at the more complex rendering functions. A simple screen wipe take about 400 milliseconds ! I suggest you switch to the UART interface (neither of the 2 option pads solder-shorted). You can then use the PySerial package to easily write to the LCD module. You can use a simple adapter on any USB port like this:   or this:

Though I have not tried it, PySerial allows direct control of the CTS signal which could be tied to the MCLR pin on the LCD's PIC pin 1 via the test connector. Not all USB-to-Serial adapter modules bring out the CTS signal to the adapter's interface pins.

Good luck !


RE: Digole Serial Read Touch 2.6'' With Python

That post so interesting Pascor ¡¡

I agree with you and all the comments. I will make a test connection to pin you comment me.
Will connect port 1 of digole to a GPIO of BBGW (effected, for soft reboot), I understand that when the port 1 is set to High, the display will be reboot.
In my case the BEAGLEBONE Green Wireless has a Grove-UART port that connects to the display by the UART (9600). In my case, I frame pins for the UART is RX, TX, 3.3V, Gnd. I do not have the option of using a CTS pin.
I find it very interesting the tools usb dongles you propose to test me, purchasing a few to investigate
You remember the link of the datasheet ? Can post ?
Thank you very much Pascor

RE: Digole Serial Read Touch 2.6'' With Python

If you are using UART to control Digole Serial display, it's easy to sync the read function, the display just send all return data to the UART port when that ready, you need check the bytes received from UART port.

Not like I2C and SPI mode, there is no shake hand method on UART mode, because UART can do bi-directional communication.

So, it's usually not lost sync data on UART mode.

If you are reading touch screen, you may need to check the return x,y position in the range of LCD panel, if data out of range, just discard that pair of data.

You also can check "PENIRQ" pin on the module to determine the touch screen pressed or not.

RE: Digole Serial Read Touch 2.6'' With Python

Good morning Services


Thanks for the notation, will try to make their advice, but right now I'm more interested 2 point of the question:
Reset the display when the MCU or board do a reboot
I tried to put into practice the advice of Pascor, but I have not succeeded. When I put the course GND pin 1 of the socket 2x16 this is not restarted, what it does is turn the screen or change the position of text on the screen.
Can you tell me if it is the right way?
Thank you so much

RE: Digole Serial Read Touch 2.6'' With Python

 RESET the module: you can find a "5 blank pads" group near by the "I2C/SPI" jumper, there is a rectangle pad in the group, this is the RESET pin, pull this pin to low then to high logic will restart the module.

RE: Digole Serial Read Touch 2.6'' With Python

Schematic ? Hah !  I have no schematic and I don't believe one is available.

Pin 1 of the PIC controller is the only signal -not- brought oit to that temporary connector. But, you can see a trace connecting it to the square pad of the 5-pad row !  I should have checked the PIC's pin 1 PCB trace more carefully.

At what point in time are commands echoed back to the sender ? As soon as they are received (but not yet read by the PIC from the RX buffer) ? When the command has been read and accepted but not yet carried out ? When the operation has been completed ? How does the sender know if the PIC's RX buffer has over-flowed ?

Is XON/XOOF protocol been implemented ? If so, how can it be turned on and off ? I have spent far, far too much time guessing what delay times are needed after sending some commands before those operations are completed !

RE: Digole Serial Read Touch 2.6'' With Python

There is no way to predict when the receiver buffer gonna overflow, the module has 2KB RAM buffer to receive commands and data, so data received will be stored in the buffer immediately for pending process.

If the firmware send an indicator to master controller the buffer status after each byte recived, that will make the usage more complicated especially on SPI mode, and need bi-direction communication.

If you sent "READ" commands to the module(like read touch, flash, EEprom), the good practice is wait till the all needed data send back from module, then do next command, the 2KB buffer is empty at this time.


RE: Digole Serial Read Touch 2.6'' With Python

Topic 1: Reset Display:


Thank you support team, with this connection I can make the physical reset the device. Thanks for the info . Logically questiones now many more open.
It is advisable to use a pull-up resistor for input voltage of 3.3V on the reset pin?
Topic 2 Reading data in Python:
@Pascor: I am very interested your doubts, we can put into practice your doubts? I can help you?
@Service: On the issue of possible control of the buffer can be interesting then be used in python / PySerial one of two functions:
in_waiting ()
inWaiting ()
What is the last thing that sends the display to the controller before empty the buffer? "\n"?
Very interesting your posts, thanks to two

RE: Digole Serial Read Touch 2.6'' With Python

1) if you reset the module by using the open source circuit, then you need a pull up resistor to 3.3V, other case, no.

2)Your controller must read out all expected length of data from the display, otherwise, the display only can receive data then put them in the qurey in the receive buffer, the display will excute the following commands after all required data send out, eg.: if you send "read touch screen" command to display, the display will waiting for a touch screen event, then send 4 bytes of data out, before these 4 bytes send out, the display only can receive data into the buffer, but not able to run that.

3)the display can store the maximum of 2KB of pending commands+data in the buffer, the data in buffer is FIFO, so, don't drive the buffer overflow in anytime is OK enough, you don't need to know the detail of time cost for each kind of command.

RE: Digole Serial Read Touch 2.6'' With Python

 Thansk service for the time, and the info

RE: Digole Serial Read Touch 2.6'' With Python

OK thanks I'll try that when I get home. I'm away for a couple of days.

I'm surprised I'm overflowing the buffer as the same 1920 bytes loads under the 'DIM' command just fine and produces a perfect picture (and that's how I worked out the welcome screen I wanted) but I can soon write a loop to pause every 256 bytes.

Thanks again I will try it in a day or two.

RE: Digole Serial Read Touch 2.6'' With Python


Hi...i am a new user here. As per my knowledge a quick look at the spec sheet for this 28-pin PIC package shows that pin 1 for this IC is "MCLR", short for "Master Clear" which is the reset pin I think you are looking for. I have found no PCB pads for an actual reset switch or even simple PCB pads large enough to solder typical signal wires.


printed circuit assembly

Copyright Digole Digital Solutions, 2008-2022. All rights reserved.
Powered by Digole