1
0
mirror of https://github.com/stargieg/bacnet-stack synced 2025-10-26 23:35:52 +08:00
bacnet-stack/ports/atmega8
2017-04-05 00:17:57 +02:00
..
apdu.c fork from http://sourceforge.net/projects/bacnet/ 2013-03-21 22:53:31 +01:00
avr035.h fork from http://sourceforge.net/projects/bacnet/ 2013-03-21 22:53:31 +01:00
bacnet.ewp [r3109] Updated Atmega8 project to compile under IAR EWARM 6.40.3 2017-04-05 00:17:57 +02:00
bacnet.eww update to r3056 from https://sourceforge.net/p/bacnet/code/3056/tree/trunk/bacnet-stack/ add ipv6 and schedule support 2016-10-30 16:16:03 +01:00
device.c [r3058] Changed Device_Object_List_Identifier() to use uint32_t for array_index since that is the size decoded in a ReadProperty request, and unsigned is not always 32-bit. \n Author: skarg@r3058 2016-11-01 03:32:21 +01:00
dlmstp.c update to r3056 from https://sourceforge.net/p/bacnet/code/3056/tree/trunk/bacnet-stack/ add ipv6 and schedule support 2016-10-30 16:16:03 +01:00
hardware.h [r3109] Updated Atmega8 project to compile under IAR EWARM 6.40.3 2017-04-05 00:17:57 +02:00
hardware.ods fork from http://sourceforge.net/projects/bacnet/ 2013-03-21 22:53:31 +01:00
iar2gcc.h update to r3056 from https://sourceforge.net/p/bacnet/code/3056/tree/trunk/bacnet-stack/ add ipv6 and schedule support 2016-10-30 16:16:03 +01:00
main.c update to r3056 from https://sourceforge.net/p/bacnet/code/3056/tree/trunk/bacnet-stack/ add ipv6 and schedule support 2016-10-30 16:16:03 +01:00
Makefile [r3059] Fixed ports for Atmega8, Atmega168, and Xmega to compile. 2016-11-01 19:22:01 +01:00
readme.txt fork from http://sourceforge.net/projects/bacnet/ 2013-03-21 22:53:31 +01:00
rs485.c [r3109] Updated Atmega8 project to compile under IAR EWARM 6.40.3 2017-04-05 00:17:57 +02:00
rs485.h fork from http://sourceforge.net/projects/bacnet/ 2013-03-21 22:53:31 +01:00
stdbool.h fork from http://sourceforge.net/projects/bacnet/ 2013-03-21 22:53:31 +01:00
stdint.h fork from http://sourceforge.net/projects/bacnet/ 2013-03-21 22:53:31 +01:00
timer.c fork from http://sourceforge.net/projects/bacnet/ 2013-03-21 22:53:31 +01:00
timer.h fork from http://sourceforge.net/projects/bacnet/ 2013-03-21 22:53:31 +01:00

This port was originally done with the Atmel ATmega168 
I used the following tools:
1. The WinAVR compiler avr-gcc (GCC) 4.1.2 (WinAVR 20070525)
and tools from <http://winavr.sourceforge.net/>, hints and 
sample code from <http://www.avrfreaks.net/> and 
<http://savannah.gnu.org/projects/avr-libc/>.
"avr-binutils, avr-gcc, and avr-libc form the heart of the 
Free Software toolchain for the Atmel AVR microcontrollers."
2. AVR Studio 4 from Atmel <http://atmel.com/>

The hardware is expected to utilize the signals as defined
in the spreadsheet hardware.ods (OpenOffice.org calc).
Attach a DS75176 RS-485 transceiver (or similar) to the USART.
DS75176 ATmega168
------  ---------
 RO       RXD
 /RE      --choice of I/O
 DE       --choice of I/O
 DI       TXD
 GND      GND
 DO       --to RS-485 wire
 DO       --to RS-485 wire
 +5V      From 5V Regulator

The makefile allows you to build a simple server. 
dlmstp is the datalink layer for MS/TP over RS-485.
This project uses an MS/TP Slave Node.

I used the makefile from the command line on Windows:
C:\code\bacnet-stack\ports\atmega168> make clean all

The BACnet Capabilities include ReadProperty support.  
The BACnet objects include only a Device object.  
All required object properties can be retrieved using ReadProperty.  

With full optimization, the statistics on the demo are:

avr-gcc (GCC) 4.2.2 (WinAVR 20071221rc1)
Device: atmega168
Program:    8734 bytes (53.3% Full)
Data:        254 bytes (24.8% Full) (does not include CStack)

Hopefully you find this code useful!

Steve Karg <skarg@users.sourceforge.net>