Skip to content

Commit

Permalink
board corrections + atmega firmware
Browse files Browse the repository at this point in the history
  • Loading branch information
Nephirus committed Sep 18, 2012
1 parent 9e599e4 commit 8f0ee99
Show file tree
Hide file tree
Showing 38 changed files with 9,364 additions and 3 deletions.
430 changes: 429 additions & 1 deletion eagle/brmscope/eagle.epf

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions eagle/brmscope/stepper_driver.brd
Expand Up @@ -2184,6 +2184,8 @@ design rules under a new name.</description>
<wire x1="31.75" y1="36.195" x2="31.115" y2="35.56" width="0.4064" layer="16"/>
<wire x1="31.115" y1="35.56" x2="31.115" y2="33.02" width="0.4064" layer="16"/>
<wire x1="31.115" y1="33.02" x2="32.385" y2="31.75" width="0.4064" layer="16"/>
<contactref element="IC4" pad="2"/>
<wire x1="37.6174" y1="41.84" x2="46.2026" y2="42.64" width="0" layer="19" extent="16-16"/>
</signal>
<signal name="N$3">
<contactref element="IC4" pad="15"/>
Expand Down Expand Up @@ -2392,6 +2394,8 @@ design rules under a new name.</description>
<wire x1="32.385" y1="35.56" x2="34.925" y2="35.56" width="0.4064" layer="16"/>
<wire x1="34.925" y1="35.56" x2="36.195" y2="36.83" width="0.4064" layer="16"/>
<wire x1="36.195" y1="36.83" x2="36.195" y2="39.37" width="0.4064" layer="16"/>
<contactref element="IC4" pad="1"/>
<wire x1="37.6174" y1="39.44" x2="46.2026" y2="43.44" width="0" layer="19" extent="16-16"/>
</signal>
<signal name="N$37">
<contactref element="X5" pad="1"/>
Expand Down
14 changes: 12 additions & 2 deletions eagle/brmscope/stepper_driver.sch
Expand Up @@ -11101,10 +11101,15 @@ Source: www.kingbright.com</description>
<net name="N$13" class="0">
<segment>
<pinref part="IC4" gate="G$1" pin="ADC7"/>
<wire x1="-43.18" y1="22.86" x2="10.16" y2="22.86" width="0.1524" layer="91"/>
<wire x1="-43.18" y1="22.86" x2="-33.02" y2="22.86" width="0.1524" layer="91"/>
<pinref part="IC2" gate="A" pin="I1"/>
<wire x1="-33.02" y1="22.86" x2="10.16" y2="22.86" width="0.1524" layer="91"/>
<wire x1="10.16" y1="22.86" x2="10.16" y2="20.32" width="0.1524" layer="91"/>
<wire x1="10.16" y1="20.32" x2="12.7" y2="20.32" width="0.1524" layer="91"/>
<pinref part="IC4" gate="G$1" pin="PD4(XCK/T0)"/>
<wire x1="-43.18" y1="7.62" x2="-33.02" y2="7.62" width="0.1524" layer="91"/>
<wire x1="-33.02" y1="7.62" x2="-33.02" y2="22.86" width="0.1524" layer="91"/>
<junction x="-33.02" y="22.86"/>
</segment>
</net>
<net name="N$3" class="0">
Expand Down Expand Up @@ -11315,10 +11320,15 @@ Source: www.kingbright.com</description>
<net name="N$12" class="0">
<segment>
<pinref part="IC4" gate="G$1" pin="ADC6"/>
<wire x1="-43.18" y1="25.4" x2="5.08" y2="25.4" width="0.1524" layer="91"/>
<wire x1="-43.18" y1="25.4" x2="-35.56" y2="25.4" width="0.1524" layer="91"/>
<pinref part="IC2" gate="A" pin="I2"/>
<wire x1="-35.56" y1="25.4" x2="5.08" y2="25.4" width="0.1524" layer="91"/>
<wire x1="5.08" y1="25.4" x2="5.08" y2="12.7" width="0.1524" layer="91"/>
<wire x1="5.08" y1="12.7" x2="12.7" y2="12.7" width="0.1524" layer="91"/>
<pinref part="IC4" gate="G$1" pin="PD3(INT1)"/>
<wire x1="-43.18" y1="10.16" x2="-35.56" y2="10.16" width="0.1524" layer="91"/>
<wire x1="-35.56" y1="10.16" x2="-35.56" y2="25.4" width="0.1524" layer="91"/>
<junction x="-35.56" y="25.4"/>
</segment>
</net>
<net name="N$37" class="0">
Expand Down
75 changes: 75 additions & 0 deletions firmware/Readme.txt
@@ -0,0 +1,75 @@
This is the Readme file for the hid-data example. In this example, we show
how blocks of data can be exchanged with the device using only functionality
compliant to the HID class. Since class drivers for HID are included with
Windows, you don't need to install drivers on Windows.


WHAT IS DEMONSTRATED?
=====================
This example demonstrates how the HID class can be misused to transfer fixed
size blocks of data (up to the driver's transfer size limit) over HID feature
reports. This technique is of great value on Windows because no driver DLLs
are needed (the hid-custom-rq example still requires the libusb-win32 DLL,
although it may be in the program's directory). The host side application
requires no installation, it can even be started directly from a CD. This
example also demonstrates how to transfer data using usbFunctionWrite() and
usbFunctionRead().


PREREQUISITES
=============
Target hardware: You need an AVR based circuit based on one of the examples
(see the "circuits" directory at the top level of this package), e.g. the
metaboard (http://www.obdev.at/goto.php?t=metaboard).

AVR development environment: You need the gcc tool chain for the AVR, see
the Prerequisites section in the top level Readme file for how to obtain it.

Host development environment: A C compiler and libusb on Unix. On Windows
you need the Driver Development Kit (DDK) Instead of libusb. MinGW ships
with a free version of the DDK.


BUILDING THE FIRMWARE
=====================
Change to the "firmware" directory and modify Makefile according to your
architecture (CPU clock, target device, fuse values) and ISP programmer. Then
edit usbconfig.h according to your pin assignments for D+ and D-. The default
settings are for the metaboard hardware.

Type "make hex" to build main.hex, then "make flash" to upload the firmware
to the device. Don't forget to run "make fuse" once to program the fuses. If
you use a prototyping board with boot loader, follow the instructions of the
boot loader instead.

Please note that the first "make hex" copies the driver from the top level
into the firmware directory. If you use a different build system than our
Makefile, you must copy the driver by hand.


BUILDING THE HOST SOFTWARE
==========================
Make sure that you have libusb (on Unix) or the DDK (on Windows) installed.
We recommend MinGW on Windows since it includes a free version of the DDK.
Then change to directory "commandline" and run "make" on Unix or
"make -f Makefile.windows" on Windows.


USING THE COMMAND LINE TOOL
===========================
The device implements a data store of 128 bytes in EEPROM. You can send a
block of 128 bytes to the device or read the block using the command line
tool.

To send a block to the device, use e.g.

hidtool write 0x01,0x02,0x03,0x04,...

and to receive the block, use

hidtool read


----------------------------------------------------------------------------
(c) 2008 by OBJECTIVE DEVELOPMENT Software GmbH.
http://www.obdev.at/
42 changes: 42 additions & 0 deletions firmware/commandline/Makefile
@@ -0,0 +1,42 @@
# Name: Makefile
# Project: hid-data example
# Author: Christian Starkjohann
# Creation Date: 2008-04-11
# Tabsize: 4
# Copyright: (c) 2008 by OBJECTIVE DEVELOPMENT Software GmbH
# License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt)
# This Revision: $Id$

# Please read the definitions below and edit them as appropriate for your
# system:

# Use the following 3 lines on Unix and Mac OS X:
USBFLAGS= `libusb-config --cflags`
USBLIBS= `libusb-config --libs`
EXE_SUFFIX=

# Use the following 3 lines on Windows and comment out the 3 above:
#USBFLAGS=
#USBLIBS= -lhid -lusb -lsetupapi
#EXE_SUFFIX= .exe

CC= gcc
CFLAGS= -O -Wall $(USBFLAGS)
LIBS= $(USBLIBS)

OBJ= hidtool.o hiddata.o
PROGRAM= hidtool$(EXE_SUFFIX)

all: $(PROGRAM)

$(PROGRAM): $(OBJ)
$(CC) -o $(PROGRAM) $(OBJ) $(LIBS)

strip: $(PROGRAM)
strip $(PROGRAM)

clean:
rm -f $(OBJ) $(PROGRAM)

.c.o:
$(CC) $(ARCH_COMPILE) $(CFLAGS) -c $*.c -o $*.o
18 changes: 18 additions & 0 deletions firmware/commandline/Makefile.windows
@@ -0,0 +1,18 @@
# Name: Makefile.windows
# Project: hid-data example
# Author: Christian Starkjohann
# Creation Date: 2008-04-11
# Tabsize: 4
# Copyright: (c) 2008 by OBJECTIVE DEVELOPMENT Software GmbH
# License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt)
# This Revision: $Id$

# You may use this file with
# make -f Makefile.windows
# on Windows with MinGW instead of editing the main Makefile.

include Makefile

USBFLAGS=
USBLIBS= -lhid -lsetupapi
EXE_SUFFIX= .exe

0 comments on commit 8f0ee99

Please sign in to comment.