Archive for September, 2007

BACnet MS/TP on a Logic Analyzer

Sunday, September 30th, 2007

I used to analyze BACnet MS/TP RS-485 traffic using an HP54645D 100MHz 2+16 channel mixed signal oscilloscope because it had a deep buffer and MegaZoom which allowed me to see the data and timing of the frames. However, I have a new tool.

DigiView_MSTP.png

Howard introduced me to Digiview. The Digiview tool is a USB based logic analyzer. It permits you to view and decode signals. I set one of the signals to Async Decode, and gave the tool the baud rate, stop bits, parity of the signal. The software shows the logic signal and displays the decoded the data above the signal. The software also has time marker tools and allows you to set multiple time markers.

DigiView_MSTP_Timing.pngUsing the DigiView tool and software, I am able to analyze BACnet MS/TP timing and frames with ease. I can see exactly how fast each node is responding and how long each node allows for the various BACnet MS/TP frames. I can also see exactly the content of each frame without having to decode the waveforms.

There are other mini logic analyzers on the market such as BitScope, USBee, PicoScope, and the Ant8 Logic Analyzer. Jack Ganssle wrote a review of some of them.

BACnet Committee Meets in Atlanta

Friday, September 21st, 2007

The BACnet committee met in Atlanta at Georgia Tech for their interim fall meeting. We enjoyed some good food at the Park Tavern. Many working groups had productive meetings during the week.
BACnetMeetingAtlanta2007.jpgParkTavernBACnetDinner.jpgBACnetLAWG2007.jpg

Using GCC for ARM7 or AVR

Monday, September 3rd, 2007

Inspired by Building Bare-Metal ARM Systems with GNU series of articles, I recently ported the BACnet MS/TP datalink layer to an Atmel AT91SAM7S-EK board – an ARM7 processor – using a GCC cross compiler for ARM.

I evaluated GNU Toolchain for ARM, GNU ARM, WinARM, and YAGARTO toolchains on the Windows platform. They all have their merits, but all have some slight differences too. I followed an excellent tutorial by James P. Lynch called Using Open Source Tools for AT91SAM7S Cross Development to get me up and running quickly. Jim used the YAGARTO project as his toolchain.

I used the YAGARTO toolchain and created my own Makefile. Makefiles are an interesting bit of programming that seems to be a lost art. Any of the cross compiler toolchain builds should work with the Makefile with a slight modification to the name of the compiler (one of the differences in each of the various GNU ARM cross compiler projects).

During my travels down the GCC road, I found the GCC-AVR and WinAVR for Atmel AVR series of microcontrollers. I searched for GCC for an 8051. I found the SDCC project – Small Device C Compiler – for Intel 8051, Maxim 80DS390, Zilog Z80 and the Motorola 68HC08. Both projects are also in the Ubuntu Linux repository.  I noticed that the Microchip PIC24 compiler C30 is based on GCC and the source code is available on their website.