Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jul 17th, 2008, 11:18 PM   #1
helpme08
Newbie
 
Join Date: Jul 2008
Posts: 1
Rep Power: 0 helpme08 is on a distinguished road
I/O Interfacing 8255 PPI (need help)

How to write a program the detect the input switches(SW2-0 & SW2-1) Value?
SW2-1(OFF) & SW2-0(OFF), all the LED'S light are blinking . What are the codes to fill in. Thanks for the help


#include "stdafx.h"
#include "Test8255Dll.h"
#include "Test8255DllDlg.h"
#include "decdio.h"


#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif



void CTest8255DllDlg::test8255loopback()
{

static int loop = 0;
unsigned char z1 = 0;
CString str;

if (!m_hDevice)
return;


// *****Type your code here******



// *********End your code here *********

str.Format("Loop: %3d Input Switch:%02X",loop + 1, z1);

m_display8255.SetWindowText(str);

loop++;
if(loop > 1000) loop = 0;

}
helpme08 is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
I/O proccessing Freaky Chris Python 8 Mar 24th, 2008 10:42 AM
Interfacing With Hardware pal C++ 5 Sep 14th, 2007 10:01 AM
USB Interfacing samra Assembly 2 Mar 23rd, 2005 1:15 AM
Interfacing with a Keyboard brkstf Assembly 7 Mar 21st, 2005 3:48 PM
Problem with VB interfacing to C++ uman C++ 0 Feb 24th, 2005 8:07 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 2:28 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC