RSS YouTube LinkedIn Twitter XCore IRC

Search

Projects Forum

Enter your XCore Exchange username.
Enter the password that accompanies your username.

Forgot your password?

Sign up for an account

Things to do: Search all projects, Create a project

XDK text-console

by lilltroll

Project Overview

This project aims to implement a single thread small memory eating text-console to the XDK as a module, that can display text-messages @ 32bit colours (limited to 18bit by the LCD)
When the XDK is used in a standalone mode it's impossible to read messages generated by print.h
EDIT, changed to not interfere with

The code is compatible with sprintf that exist in "stdio.h" for use with formatted strings, but some other smaller code size formatting options are also provided.

It only needs 50MHz, e.g. can run with 7 other threads at full burden, and it doesn't use line or frame-buffers (to save memory). Instead it uses a small lookup table that translate one font column to 8 pixels which is much faster than bit-bangning.
Any thread on any core can send messages to the console with dynamically allocated channelends which is freed after the transmission.
The console has a blinking (insert) cursor and interprets '\n' in strings.
It uses a circular buffer so you can print out more than one page of text.
Future version will probably incorporate the touch together with a larger textbuffer so you can scroll up and down with you finger to read text over several pages.

It's intended to be easy to use like: (ver 0.21)

on stdcore[1]:printstr("Hello from Core 1\n" , LCD_RED);
on stdcore[2]:printstr("Hello from Core 2\n" , LCD_GREEN);
on stdcore[3]:LcdDriverCGA(r_lcd,c_console);

Verified to run on

Images and diagrams

Rate this project


4.666665
Average: 4.7 (3 votes)
Your rating: None

Share this project!

Twitter Icon Share on Twitter

Twitter Icon Share on Facebook

submit to reddit Share on Reddit

Comments / Updates

V 0.31

This version doesn't fail when many other streaming and non streaming channels are sending data.

It is using PtP channels - and that is not the meaning with the final version, but I have to learn more about SSWITCH and PSWITCH before I can create a stable package based network.

At least I believe thit version will not lock or loose other channel data.

"Don't mess with the interconnect if you do not have any idea of what you are doing ;)"

BUGs and worse

I found a bug regarding the cursor, but worse the code is totally ignorant regarding programming the switch and interconnect. It works stand alone, but included in a larger project, things get might get messy and strange, and other chan data might get lost.

You can read about it here:
https://www.xmos.com/download/public/XS1-L-System-Specification(0.96).pdf

"
By keeping streams short and synchronising often, streams can also be used
to exchange packets of data. The cost of setting up a stream and terminating
a stream is small, and unlike traditional packet-oriented networks, the packet
is transmitted while it is being constructed; this overlaps packet creation and
packet reception, reducing latency"

Sure - But how do I do it ??

C comp

I changes things so it will be comp. with the XSOCKETS module. For an example it needed to be ANSI C comp. and not error with print.h, also so it handles different optimization in different modules.

New release will come after I have found all the basic changes that is needed.

About v0.21

The compiler will create warnings about the loose server chanend, but that is the intention with it.
I haven't told the compiler to avoid the warning.

All client connects to chanend 0x30102. If the server cannot grab chanend 0x30102 itself an error will be displayed on the screen.

New modules by XMOS

XMOS has released
module_xdk_avb_common

which contains alot of common functions to the XDK., but it also says
"All code contained in this package under XMOS copyright must be
licensing for any use from XMOS."

Intresting

Look what I found in the new AVB package

/**
* ModuleName LCD Client text commands.
* @Author Ross Owen
* @Date 22/10/2008
* @Version 1.1
* @Description: Simple LCD Client Component functions
*
*
**/

Funny bug

I found a funny little bug in the circ textbuffer. The text jumps to the right when the page is full.
I have to eat, so be patient and wait for the 0.21.

X