OpenCores
URL https://opencores.org/ocsvn/openmsp430/openmsp430/trunk

Subversion Repositories openmsp430

[/] [openmsp430/] [trunk/] [fpga/] [actel_m1a3pl_dev_kit/] [software/] [spacewar/] [hardware.c] - Diff between revs 84 and 143

Show entire file | Details | Blame | View Log

Rev 84 Rev 143
Line 1... Line 1...
#include "msp430x20x3.h"
#include "omsp_system.h"
#include <signal.h>                    // Needed for using interrupts with msp430-gcc
 
#include "spacewar.h"
#include "spacewar.h"
 
 
//************************************************************
//************************************************************
// externals
// externals
//
//
Line 91... Line 90...
*/
*/
unsigned int read_a2d(unsigned int next_mux)
unsigned int read_a2d(unsigned int next_mux)
{
{
  unsigned int last_a2d;
  unsigned int last_a2d;
 
 
  if (next_mux==SD16INCH_2) {
  if (next_mux==0x0002) {
    last_a2d = MY_CNTRL1;
    last_a2d = MY_CNTRL1;
  } else {
  } else {
    last_a2d = MY_CNTRL2;
    last_a2d = MY_CNTRL2;
  }
  }
 
 
Line 125... Line 124...
/* Description:
/* Description:
First put the value into the transmit register.  Chip select the DAC.
First put the value into the transmit register.  Chip select the DAC.
Start the automatic SPI transfer.  Wait until the transfer is complete.
Start the automatic SPI transfer.  Wait until the transfer is complete.
Finally remove the chip select.
Finally remove the chip select.
*/
*/
void set_one(int set_1)
/*
{
void set_one(int set_1)
 
{
  USISR = set_1;                        // send value to DAC
 
  P1OUT &= ~0x04;                       // chip select TLV5618A
  USISR = set_1;                        // send value to DAC
  USICNT = 0x10 + USI16B;               // start spi
  P1OUT &= ~0x04;                       // chip select TLV5618A
  while ((USIIFG & USICTL1) == 0) ;     // wait until y spi done
  USICNT = 0x10 + USI16B;               // start spi
  P1OUT |= 0x04;                        // remove chip select
  while ((USIIFG & USICTL1) == 0) ;     // wait until y spi done
}
  P1OUT |= 0x04;                        // remove chip select
 
}
 
*/
 
 
// ************************************************************
// ************************************************************
//
//
//  Move DAC's to dot position
//  Move DAC's to dot position
//
//

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.