abandoned bytes
Engineering: the art of making what you want from things you can get.

Yaca: control panel plans, yaca-serial speedup

July 16, 2010

The "control panel" (Dell Axim X50 PocketPC) on the living room wall will be the central control point of Yaca. It will display a finger-friendly AJAX web interface in Pocket Internet Explorer in full screen mode. The network connection will be implemented as "dial-up" over the Axim's serial port and an MCU which transfers the serial data over the CAN bus to the good old pppd running on wrt54gl.

For the interface to be usable, a decent transfer speed is needed, for which the current 9600 baud on yaca-serial (the IP/CAN gateway) is NOT satisfactory - tt would be nice to use the full 125 kbit/s of the CAN bus. After some playing with OpenWRT, I noticed that the wrt54gl's UART is not clocked by a baud rate crystal, but by some single-decimal MHz value. Consequently, it can only provide the higher baud rates with huge error.

yaca-serial is, however, clocked by 16 MHz (okay, until now it was scaled-down to 2 MHz)! So both devices can communicate at the (absolutely non-standard) speed of 250.000 baud! Thus, no more waiting for slow firmware downloads :-)

This discovery took over 3 hours - the yaca-serial firmware was unstable and kept stopping the transmission of received CAN frames over the serial line at high baud rates and 2 MHz. Raising to 4 or 8 MHz just delayed the issue, while 16 Mhz seems to have solved it. The prescalable MCP2515 clock output rules!

control panel   The current control panel poses a new issue: It will not run on the standard 2 MHz (which is hardcoded into the bootloader for boot wait, into libyaca-bl for init delays etc.), but with a baud rate crystal of 14.745 MHz. For now, a new branch (bootloader-control-panel) is used with all clock frequencies adapted - ControlPanel is flashed with a custom bootloader. Custom bootloaders need further elaboration! Also, different clock frequencies on different modules could somehow be automatized (problem: bootloader only compiles with old avr-gcc [4.2.2 is known to be good, 4.4.3 generates bloated code]).


This blog entry is the first of (hopefully) many small status updates on Yaca (Yet Another CAN Automation), my DIY home automation. I'd best compare the information I upload about Yaca to puzzle tiles - the picture is made up of tiles; no single tile can show the complete picture, however.

Last modified: July 16, 2010

Comments

No comments yet. Why don't you write the first one?

Write a comment

The fields e-mail and website are optional. Your e-mail-address will not be displayed, it's only for me to be able to reply.

Name:
E-Mail:
Website:

Fill in the CAPTCHA to prove you are human:

© 2009 by David Madl. Impressum | Home (English) | Home (Deutsch) | Processing time: 0.398 s | IPv4

abandoned bytes (en) > Blog > 2010-07-16
User:
Pass: