Hi guys,
I came across this piece of code for a 8051 interfacing with an ADC :
Here the programmer sets READ WRITE and INTR to be certain bits of a specific port, and later he changes the values of these bits by changing the corresponding variable.. I was wondering if there is an equivalent code for the AVR AVmega8515 .... Thanks guys
I came across this piece of code for a 8051 interfacing with an ADC :
Rich (BB code):
Program:
#include <reg51.h>
#include "io.h"
sbit READ = P3^2;
sbit WRITE = P3^3;
sbit INTR = P3^4;
void main( void )
{
unsigned char adVal;
unsigned long volts;
InitIO();
READ = 1;
WRITE = 1;
INTR = 1;