All Forums
 Embedded Linux
 Linux FAQ
 How do I use ADSmartIO?
 Forum Locked
 Send Topic to a Friend
 Printer Friendly
Author Topic  

jlackey

213 Posts

Posted - 22 May 2002 :  16:40:10  Show Profile  Email Poster
How do I use ADSmartIO?

Look at the sample code in ADSmartIO to see how to write programs that use it.

ADSmartIO is a combination of hardware, AVR firmware, and a device driver. If you are running linux on one of our boards, you have the hardware. The AVR firmware is preinstalled and upgradeable. Our kernels are configured with the drivers and devices enabled.

You may need to add device nodes (e.g. /dev/sio0, etc.) to your root file system. The ADSmartIO topic lists the major and minor numbers for the ADSmartIO devices. The syntax for adding a device node is:
    mknod /dev/sio0 c 58 0

How do I update the AVR firmware on my board?

To update the AVR firmware you need 3 files:
    avrprog.o - a kernel module that provides the interface to the AVR
    programavr - the program that updates the firmware on the board
    *.bin - the new firmware, e.g. avr_10.bin (see ADSmartIO topic index for latest releases)

After you get these files, follow these steps:
    1. Put the files on your board and cd to their directory. For example, put the files on an ATA flash card, insert the card in your board, and enter these commands:
      mount /dev/hda1 /mnt
      cd /mnt

    2. If /dev/avr doesn't exist, create it with the command:
      mknod /dev/avr c 60 0

    3. Load the kernel module with the command:
      insmod avrprog.o

    4. Update the AVR with the new firmware using the command:
      ./programavr avr_10.bin

    Substitute the file name above with the name of the new firmware file. Also, you may need to make programavr executable using the command:
      chmod a+x ./programavr

How do I build the avrprog.o module?

Use the make file provided with the source code to build this module. You should set INCLUDEDIRS to the kernel source tree directory which has been configured for the system you are using.

How do I build programavr?

Just compile the source file with an arm cross compiler:
    arm-linux-cc programavr.c -o programavr

Where do I get the source code?

The source code is now available on the web.

Download either the SA1110 source files or the PXA source files depending on which processor your board has.

The VEE control doesn't seem to do anything. Is this device broken?

The ioctl for the VEE (/dev/sio9) controls the contrast on passive matrix screens. If you have an active matrix screen, this control has no effect.

Note: In some of the source code, the ioctl for the back light PWM (/dev/sio6) is misidentified as 'contrast'. It is really a back light brightness control.

You can experiment with the VEE contrast control using
    echo -n -e '\0\xHH' > /dev/sio9'
where HH is a hexadecimal value from 00 to FF.

I've used all the smart I/O lines. Are there any more digital I/Os or A/Ds available?

The latest version of the device driver adds support for UCB1200 A/D and digital I/O (on platforms that have a UCB1200 chip; this is in addition to the AT90LS8535 I/O). This support is new and still changing. We recommend using non-UCB1200 I/O capabilities first. If you need more I/O lines, let us know and we'll send the latest patch for using the UCB1200.


30-Dec-2003: jlackey - add information ralated to the root file system
4-Sep-2003: jlackey - add source code
3-May-2003: akidder - add link to ADSmartIO topic index
17-Sep-2004: rwhaley - updated source code to also set atmega fuses

Edited by - adrian on 07 Jan 2008 15:16:10
  Topic  
 Forum Locked
 Send Topic to a Friend
 Printer Friendly
Jump To:
Eurotech Support Forums © Eurotech Inc. Go To Top Of Page
This page was generated in 0.03 seconds. Snitz Forums 2000