Work notes:
AVRlib's uartsw.h has to be patched to compile for ATmegax8s. Summary of changes (TODO: post a patch file):
Include the right timer header file:
#if defined(__AVR_ATmega168__)
#include "timerx8.h"
#else
#include "timer.h"
#endif
Define aliases for register and bit names that have changed (can be done in our global.h):
#ifndef TIMSK
#define TIMSK TIMSK1
#endif
#ifndef TICIE1
#define TICIE1 ICIE1
#endif
#ifndef TIFR
#define TIFR TIFR1
#endif
To circumvent redefinition of TIMER0_OVERFLOW signal handler, created local copies of wiring.c and timerx8.c - took the handler out of wiring.c and moved the functionality.
Thread on the strange PSTR() warning: http://www.avrfreaks.net/index.php?name=PNphpBB2&file=printview&t=57011&start=20
To change a variable value, Juxtapose uses the following ascii message protocol:
tune:varname:varvalue
where varvalue is an ascii representation of the variable value. Examples:
tune:dly:80
tune:blink:true
For our serial port implementation, SLIP encoding (http://tools.ietf.org/html/rfc1055) will wrap each message with END symbols (0xC0).
Thus, the complete message for tune:dly:80 in hex will be:
0xC0 0x74 0x75 0x6E 0x65 0x3A 0x64 0x6C 0x79 0x3A 0x38 0x30 0x3A 0xC0
To test reception of these messages, I used Realterm. In the "send" tab, either copy and paste the hex values and hit "send numbers", or write the ascii string, hit "send ascii", then type 0xC0 into the small numbers box below the larger text entry boxes:
To get the list of variables in an application, Justapose sends an the following "remote procedure call" message:
rpc:vars
The application (running on Arduino) should then reply with:
rpc-return:vars:var1name:var1type:var1value;var2name,var2type,var2value;...
Because Juxtapose started off with javascript, the only two types supported are "number" and "boolean". Example:
rpc-return:vars:dly:number:50;blink:boolean:false;
SiLabs Hackery:
VCP : 10C4/EA60
http://www.silabs.com/tgwWebApp/public/web_content/products/Microcontrollers/USB/en/mcu_vcp.htm
Comments (0)
You don't have permission to comment on this page.