I didn't quite understand 'ACK'

Hello,

I'm a proud owner of the SmartGPU graphics processor for Arduino.

It's this: http://vizictechnologies.com/#/smart-gpu/4554296549

However, I had some problems doing double buffering. The support sais that the GPU is USART double buffered and I need to wait for an ACK before I draw something. But then again, if I wait, It will still flicker because each line/rectangle/triangle is drawn sequentially, right?

Did I not understand something elementar here?

ACK is a serial protocol thing, software flow-control. If you just send instructions over the serial port at full speed then the GPU may get behind if its doing heavy-lifting and the serial buffer will overflow - it will then miss stuff. So you need to keep synchronized to prevent the buffer overflowing - hence using an ACK to signal readiness.

The commands of the SmartGPU either return ACK or NCK (no acknowledgement). How do I respond to those commands?

DevilsChild:
The commands of the SmartGPU either return ACK or NCK (no acknowledgement). How do I respond to those commands?

Did you look at the linked “Command Set” document or just the datasheet? After taking a quick look at both, it’s clear the Command Set goes into much more detail about the control and communications for this device.

ACK needs no response. It simply informs you that the command was executed successfully.
NAK may need a response, if you want that command to execute successfully. The response would be to issue the command again.

As for the flickering, are you communicating at the default baud rate? 9600 baud is really slow for something like issuing graphics commands for a GUI. You’ll want to communicate at as high a speed as you can reliably establish. You should at least be using 115200 at a bare minimum, but the higher the better. The board supports up to 2mb.

Yes, I'm communicating with 2.000.000 and it is a lot faster. But when you look at my scene:

1
Clear Screen
Draw Triangle 1
Draw Triangle 2
Draw Triangle 3
Draw Triangle 4
Goto 1

I'm gonna try it with waiting for ACK, but what I really want is clearing the screen, drawing everything and then displaying it. I think this is nothing which can be achieved with waiting for ACK, right?

DevilsChild:
but what I really want is clearing the screen, drawing everything and then displaying it. I think this is nothing which can be achieved with waiting for ACK, right?

That requires the output be buffered (at least double), and a quick perusal of their command set documentation didn't turn up any commands related to buffering of any type, which seems like a pretty severe limitation for this level of hardware. That capability may be undocumented, though I can't really think of a valid reason why it would be.

Best bet would be to contact the manufacturer and ask them. You are correct in that it has nothing to do with ACK/NAK though. You need the ability to draw to a back buffer, then present that buffer to the screen after all drawing has completed. Rinse and repeat.

Thank you for your quick answers. I will look at this a little more to see what I can get out of it :slight_smile: