All Forums
 Hardware
 General Hardware, ADSmartIO, Digital I/O and A/Ds
 A2DTest
 Forum Locked
 Printer Friendly
Author Topic  

rbhalla

13 Posts

Posted - 04 Jun 2002 :  14:57:30  Show Profile
I downloaded the A2DTest program that reads the 8 analog ports on the ADS Graphics Master plus. I then added two more call to configure the PORTB as output and write a value. These calls are

SIOInitDDRB(0x0f); // Configure Port B as output
SIOWritePortC(value);

However the app crashes when you run and gives a Fatal Application error exception 0xc0000005 address 0x00000000

I am clueless.
ADS Reports a smartIO part type 0x4434 version 0x4017 revision j




Edited by - rbhalla on 06/04/2002 15:08:56

ctacke

877 Posts

Posted - 04 Jun 2002 :  15:32:24  Show Profile
Just to clarify, you are configuring port B for output (SIOInitDDRB), but the code you posted is writing to Port C (SIOWritePortC(value);).

Is this a typo?



-----------------
Chris Tacke, eMVP
Applied Data Support
Go to Top of Page

rbhalla

13 Posts

Posted - 04 Jun 2002 :  16:22:36  Show Profile
Sorry that was a typo.
Here is an update -
The app does not crash anymore. However there is no output on portc.
Here is the relevant code


SIOSelectOption(2);
SIOInitDDRA(0x00);
SIOInitDDRC(0xff); // Configure Port C as output
SIOSetSSPTimeout(500);
while(TRUE)
{
// return to start of line each time
RETAILMSG(TRUE, (_T("\r ")));

// read data
for(int i = 0 ; i < 8 ; i++) {
RETAILMSG(TRUE, (_T("0x%04X "), SIOAnalogConversion(i)));
}

SIOWritePortC(portC);
portC ^= 0xFF;
Sleep(250);

}

Go to Top of Page

rbhalla

13 Posts

Posted - 04 Jun 2002 :  16:32:11  Show Profile
Never mind - found the problem. Bad crimp on the ribbon cable that came with the ADS. It always the ME's
Go to Top of Page

profking

8 Posts

Posted - 25 Jul 2003 :  14:04:31  Show Profile
my bitsy reads 0x0000 for a bit and then reads 0xffff until i reboot. The timeout command does not seem to have effect on result. How can I fix?
Go to Top of Page
  Topic  
 Forum Locked
 Printer Friendly
Jump To:
Eurotech Support Forums © Eurotech Inc. Go To Top Of Page
This page was generated in 0.02 seconds. Snitz Forums 2000