FEZ Panda and Picaso 4D Systems uVGA

Hi,

I’m working on a simple thermoscan project. I’m using Devantech’s TPA81 thermal array sensor and two servos to scan an area for temperature changes.
Then all the data are sent through serial communication to a Picaso uVGA-II processor that “prints” an image
in any screen that has VGA output creating a “thermal” image.

The Picaso can be accessed through a simple serial TTL port.

Anyway, the first part was easy, using a FEZ Panda and two servos I get all the data through I2C.

The issue I have is with the Picaso. It accepts simple byte commands in two ways: either by sending a Hex
number or a character representing the command you want to use.
For example, by serially sending 0x55 or ‘U’ , you send the Autobaud command.

The problem lies in the code I use, by having C# understand what exactly I want to send.

I have made a small class to have all the commands in one place. I have debbuged The “Send” or “SendChar” function I use, and it seems to send the correct data, but nothing happens.

I have tried any available code I found on the Internet but it seems that the command is sent in the wrong way and also I can’t seem to read anything back ( like an ACK or NAK response sent by Picaso).
Below, you can see a part of the code I am using,

P.S. I also use the Picaso with an Arduino Mega using the same logic in my code and it works perfect!

What is that I make wrong in this code??

Thanks!

using System;
using System.IO;
using System.Text;
using System.IO.Ports;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;


namespace VGAClass
{
    public class Picaso
    {
        private static SerialPort UART;
        private byte Screen_res = 0;
        private byte Picaso_ACK = 0x06; //command received-acknowledged-executed
        private byte Picaso_NAK = 0X15; //command not recognized
        
         public Picaso(string Comport, int baudrate)
        {
            UART = new SerialPort(Comport, baudrate);
            UART.BaudRate = 9600;                                    //9600 default rate for Picaso intialization
            UART.DataBits = 8;
            UART.Parity = Parity.None;
            UART.ReadTimeout = 0;
            UART.WriteTimeout = 0;
            UART.Handshake = Handshake.None;
            UART.Open();
        }

       

        public void Send(byte data)     //send a command byte
        {
            byte[] buffer = new byte[data];
            UART.Write(buffer, 0, buffer.Length);
        }

        public void SendChar(char data) //send a char-like command
        {

            byte[] buff = new byte[data];
            UART.Write(buff, 0, buff.Length);
        }

You are using the data byte or character to determine the size of the buffer rather then putting the byte or char into a buffer of size 1.

public void Send(byte data)     //send a command byte
 {
     byte[] buffer = new byte[]{data};
     UART.Write(buffer, 0, buffer.Length);
  }
 
public void SendChar(char data) //send a char-like command
{
     byte[] buff = new byte[]{(byte)data};
     UART.Write(buff, 0, buff.Length);
}

so simple, but I was stuck!.

thank you!

Theo

Theodoros,

Your interface to the uVGA controller sounds exciting.

Do you have a feeling for how fast this device is, and how viable it is as a VGA interface for FEZ?

Also, could you please post your driver once it is completed?

Thank you.

The Picaso is fast, really fast!
It has its own graphics processor that does the heavy work, an SD card interface and some available digital IOs to play with and a simple TTL interface…And in the price of $55, it’s a bargain…

But it also depends on the other side too, the microcontroller you use to connect with.

I have used Arduino Mega for the thermoscan project and although the software part was easy, poor Arduino
was having a hard time driving two servos, getting data from TPA81 and send them to Picaso.

FEZ Panda on the other side is an ARM and there is a lot of power to drive this fast enough.

You can use any VGA monitor with Picaso but since I wanted this to be “portable” I purchased this from eBay:

[url]http://www.ebay.com/itm/7-TFT-LED-LCD-Module-A-D-Board-VGA-2AV-Function-/190571437289?pt=BI_Electrical_Equipment_Tools&hash=item2c5ef15ce9[/url]

It’s a 7" TFT LCD screen with a VGA connection and works great! I already have it connected to Picaso and
draw some lines and rectangles using Panda.

I believe that the potentials from Panda+Picaso are limitless…

I will post my code in tinyCLR code page soon enough.

Theo

Thank you. I’m really looking forward to seeing the results of your project.