
www.4dsystems.com.au
µ
V
G
A
-PICASO-
MD1
37
6.1.25
v
sync Lock
(
v
)
Syntax :
cmd
cmd :
76
hex
, v
ascii
response : 06
hex
(ACK)
The µ
V
G
A
will respond with the ACK byte once it encounters the
next internal Vertical Sync signal.
Description :
This command allows the host to lock onto the start of the next video
frame.
This is a very useful command when moving/animating objects on the screen where
the object needs to be displayed and then erased so it can be redisplayed at a
different location to give the effect of movement. Unless the host locks onto the start
of frame, undesired blinking and tearing of the displayed object will occur. When the
host sends this command it should wait for an ‘ACK’ from the µ
V
G
A
and once the ACK
is received the host can then start issuing display commands. Use this command for
dynamically displayed objects such as a bouncing ball, etc. For static objects that don’t
move or that do not need continuos display updates, this command is not necessary.
Example of a moving object is given below:
while() {
send_cmd_uVGA(“v”);
// send the Vsync Lock command
wait_uVGA_ACK();
// µVGA will respond at start of frame
send_cmd_uVGA(‘D’, 1, x, y, BLACK);
// erase object at old loc.
send_cmd_uVGA (‘D’, 1, ++x, ++y, RED);
// display at new loc.
}
// loop around while loop
Note:
A word of caution: If the serial link is slow, that is, less than 115Kbaud, the
response from the µ
V
G
A
will be too slow for this command to be effective. Try and
make the serial link as fast as possible.