ts-7000
[Top] [All Lists]

[ts-7000] Ts-9700 with the 7800 SBC help

To:
Subject: [ts-7000] Ts-9700 with the 7800 SBC help
From: "the_chapstick" <>
Date: Wed, 29 Oct 2008 07:18:40 -0000
Hi everyone. I've been trying to do a basic test on the DAC on the
9700 board and I can't seem to get any response whatsoever from the
DAC channels.

I've been using suggestions from other users who have posted problems
with the 9700 board before but none seem to work. Here is the source code:

The idea of the test is to output the value 2000 to the DAC (thus
generating a voltage of around 2.5). I've output this value to all
channels and none of them produce anything when tested.


 #include <stdio.h>
 #include <fcntl.h>
 #include <sys/mman.h>
 #include <errno.h>
 extern int errno;

 #define BASE 0xEE000000
 #define LDAC 0x164
 #define MDAC 0x165

 
 typedef unsigned char byte;

 main(){
  byte *base;
  volatile byte *ldac;
  volatile byte *hdac;
  unsigned short int val;
  unsigned int *regs;
 

  int fd;
  float volts;
  int i,j;
  fd = open ("/dev/mem" , O_RDWR|O_SYNC);


 
 

  base = (byte *)mmap(0, getpagesize(), PROT_READ | PROT_WRITE,
  MAP_SHARED, fd, BASE);

  printf("%d\n", base);

  ldac = base + LDAC;
  hdac = base + MDAC;


 //unsigned char *dac6 = base + 0x16E;

 

 *ldac = 0xd0;
 *hdac = 0xc7; //channel 4
 
 *ldac = 0xd0;
 *hdac = 0x10; //channel 1
 
 *ldac = 0xd0;
 *hdac = 0x50; //channel 2
 
 *ldac = 0xd0;
 *hdac = 0x90; //channel 3
 //}
 
 return 0;

 }


Any suggestions would be most welcome :)

Thanks
Chris


------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/ts-7000/join
    (Yahoo! ID required)

<*> To change settings via email:
     
    

<*> To unsubscribe from this group, send an email to:
    

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

<Prev in Thread] Current Thread [Next in Thread>
  • [ts-7000] Ts-9700 with the 7800 SBC help, the_chapstick <=
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU