Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › ATTiny Matrix Binary Calculator
New Posts  All Forums:Forum Nav:

ATTiny Matrix Binary Calculator

post #1 of 9
Thread Starter 
So I'm trying to do a binary calculator for my final project in my Digital Electronics class. I'm using the ATTiny2313 IC and the AVRStudio program. This is my program:
Quote:
// basic stuff to start working in AVRstudio
#include avr/io.h
#include util/delay.h

//function prototypes(not needed in the arduini IDE)
void getKeyPress(void);
void keyData(int keyWord);
void shiftout(unsigned char myDataOut);
void pinMode(int position, int value);


int keyRow,columnData,ledRow,resulte,reset_loop,time_to_check = 0;;
unsigned char matrix_data[]={0,0,0,0};
unsigned char word_1=0,word_2=0;

int main(void){
DDRB = 0x0F;//pins PB0-PB3 outputs and pins PB4-PB7 inputs
DDRD = 0xFF;//pins PD0-PD6 are all outputs
while(1){// keeps the program running all the time

for(ledRow=0;ledRow<4;ledRow++){// this is the loop for scanning the LED display
time_to_check ++;//counts the time until the next key press check(to prevent flickering of the matrix)
PORTD = 1<<ledRow;//sets only one pin from PD0-PD3 HIGH
pinMode(5,0);//latch off
shiftout(matrix_data[ledRow]);//writes the data to the shift register
pinMode(5,1);//latch on
if(time_to_check == 125){//looks when the time is right to check for a key press
getKeyPress();// goes to the key press function
time_to_check =0;//resets the "counter"
}
else
_delay_ms(1);// a delay for each LED row
pinMode(5,0);//latch off
shiftout(0x00);// sets the shift registers outputs to low
pinMode(5,1);//latch on
}
}
return 1;
}

void getKeyPress(){ // checks what key is being pressed
for(keyRow=0;keyRow<4;keyRow++){ // scans the switch matrix(4 rows)
PORTB = (1<<keyRow); // sends a HIGH to one row at a time
columnData = (PINB & 0xF0);// reads the state of each column
_delay_us(100);// a small delay
if(columnData != 0){// if something is pressed columndata is bigger then zero
keyData(columnData | (1<<keyRow));//goes to the data analysis function
_delay_us(400);//a small delay like in the LED scanning loop
}
}
}

void keyData(int keyInput){//function for determining what each button does

switch (keyInput){

case 0b10000100:// first input row "1"
word_1 = word_1 << 1;
word_1 = word_1 | 0x01;
matrix_data[3] = word_1;
break;
case 0b10000010://first input row "0"
word_1 = word_1 << 1;
matrix_data[3] = word_1;
break;
case 0b10001000://first input row "DEL"
word_1 = 0;
matrix_data[3] = word_1;
break;
case 0b01000100://second input row "1"
word_2 = word_2 << 1;
word_2 = word_2 | 0x01;
matrix_data[2] = word_2;
break;
case 0b01000010://second input row "0"
word_2 = word_2<<1;
matrix_data[2] = word_2;
break;
case 0b01001000://second input row "DEL"
word_2 = 0;
matrix_data[2] = word_2;
break;
case 0b00010010://multiplication
resulte = word_1 * word_2;
matrix_data[1] = resulte & 0x00FF;
matrix_data[0] = (resulte >> 8) & 0x00FF;
break;
case 0b00010100://subtraction
resulte = word_1 - word_2;
matrix_data[1] = resulte & 0x00FF;
matrix_data[0] = (resulte >> 8) & 0x00FF;
break;
case 0b00011000://division
resulte = word_1 / word_2;
matrix_data[1] = resulte & 0x00FF;
matrix_data[0] = (resulte >> 8) & 0x00FF;
break;
case 0b00010001://addition
resulte = word_1 + word_2;
matrix_data[1] = resulte & 0x00FF;
matrix_data[0] = (resulte >> 8) & 0x00FF;
break;
case 0b00100010://modulo
resulte = word_1 % word_2;
matrix_data[1] = resulte & 0x00FF;
matrix_data[0] = (resulte >> 8) & 0x00FF;
break;
case 0b00100100://XOR
resulte = word_1 ^ word_2;
matrix_data[1] = resulte & 0x00FF;
matrix_data[0] = (resulte >> 8) & 0x00FF;
break;
case 0b00101000://OR
resulte = word_1 | word_2;
matrix_data[1] = resulte & 0x00FF;
matrix_data[0] = (resulte >> 8) & 0x00FF;
break;
case 0b00100001://AND
resulte = word_1 & word_2;
matrix_data[1] = resulte & 0x00FF;
matrix_data[0] = (resulte >> 8) & 0x00FF;
break;
case 0b10000001://NOT
resulte = ~resulte;
matrix_data[1] = resulte & 0x00FF;
matrix_data[0] = (resulte >> 8) & 0x00FF;
break;
case 0b01000001://DEL ALL
word_1 = 0;
word_2 = 0;
resulte =0;
for(reset_loop=0;reset_loop<4;reset_loop++)
matrix_data[reset_loop] = 0;
break;
default:// do nothing at all if more then 1 button is pressed
break;
}
}


void shiftout(unsigned char myDataOut) { // the function for sending the data to the shift register
int i;
int pinState=0;
pinMode(4,0);
pinMode(6,0);
for (i=7; i>=0; i--) {
pinMode(6,0);
if ( myDataOut & (1<<i) )
pinState = 1;
else
pinState = 0;
pinMode(4,pinState);
pinMode(6,1);
pinMode(4,0);
}
pinMode(6,0);
}


void pinMode(int position, int value)// simple function like the digitalWrite in the arduini IDE
{
if (value == 0)
PORTD &= ~(1 << position);
else
PORTD |= (1 << position);
}

The issue that I'm having is that when I try to compile it, the error box pops up saying that the two include files could not be found, and that the "void getKeyPress(void)" is an unusable or undefined macro. Any help would be greatly appreciated. biggrin.gif

PS: The 2 includes are in carrots, quotes won't let me show them if they're in carrots rolleyes.gif
Edited by DJDannyV - 4/17/12 at 6:12pm
     
CPUMotherboardGraphicsRAM
i7-2600k @ 4.7Ghz @ 1.376V Asus P8Z68-V Pro Sapphire HD6970 Patriot Viper II Sector 5 16Gb@1600 
Hard DriveOptical DriveCoolingOS
Hitachi Deskstar 2TB 7400rpm 64 mb SATAIII LG Blu-Ray Burner 12X Corsair H100 Windows 7 Professional 64-bit 
MonitorMonitorMonitorKeyboard
Samsung T240HD Samsung Syncmaster 2233 Samsung T240HD Lenovo Generic 
PowerCaseMouseMouse Pad
Thermaltake TR2 RX 850W CoolerMaster HAF 932 Advanced Sensei Raw Walmart Pad 
AudioAudioAudioAudio
Logitech Z-2300 Audio-Technica Pro700MKII Shure SRH240 Bose AE2 
OtherOtherOther
WD Elements 1.5TB Nexus 7 Blue Yeti 
CPUGraphicsRAMHard Drive
i7 3610qm GTX 670M 16 GB @ 1600 500GB x 2 in Raid 0 
Optical DriveCoolingOSMonitor
MSI IC Diamond 7 Home Premium 15.6 1080p Matte 
KeyboardPowerCaseAudio
MSI with Steelseries 180W AC Adapter MSI 16F3/GT60 Dynaudio Built-in 
CPUMotherboardGraphicsRAM
Intel Q8200 Gateway SN nVidia GT220 8GB DDR3 1333 
Hard DriveOptical DriveCoolingOS
Hitachi 640GB H-L DVD Burner Stock Windows 7 HP 64-bit 
MonitorKeyboardPowerCase
Samsung 46" LCD Logitech Wireless w/ mouse 500W Thermaltake Antec Two Hundred v2 
MouseAudio
Logitech Samsung 1000W 5.1 AVR 
  hide details  
Reply
     
CPUMotherboardGraphicsRAM
i7-2600k @ 4.7Ghz @ 1.376V Asus P8Z68-V Pro Sapphire HD6970 Patriot Viper II Sector 5 16Gb@1600 
Hard DriveOptical DriveCoolingOS
Hitachi Deskstar 2TB 7400rpm 64 mb SATAIII LG Blu-Ray Burner 12X Corsair H100 Windows 7 Professional 64-bit 
MonitorMonitorMonitorKeyboard
Samsung T240HD Samsung Syncmaster 2233 Samsung T240HD Lenovo Generic 
PowerCaseMouseMouse Pad
Thermaltake TR2 RX 850W CoolerMaster HAF 932 Advanced Sensei Raw Walmart Pad 
AudioAudioAudioAudio
Logitech Z-2300 Audio-Technica Pro700MKII Shure SRH240 Bose AE2 
OtherOtherOther
WD Elements 1.5TB Nexus 7 Blue Yeti 
CPUGraphicsRAMHard Drive
i7 3610qm GTX 670M 16 GB @ 1600 500GB x 2 in Raid 0 
Optical DriveCoolingOSMonitor
MSI IC Diamond 7 Home Premium 15.6 1080p Matte 
KeyboardPowerCaseAudio
MSI with Steelseries 180W AC Adapter MSI 16F3/GT60 Dynaudio Built-in 
CPUMotherboardGraphicsRAM
Intel Q8200 Gateway SN nVidia GT220 8GB DDR3 1333 
Hard DriveOptical DriveCoolingOS
Hitachi 640GB H-L DVD Burner Stock Windows 7 HP 64-bit 
MonitorKeyboardPowerCase
Samsung 46" LCD Logitech Wireless w/ mouse 500W Thermaltake Antec Two Hundred v2 
MouseAudio
Logitech Samsung 1000W 5.1 AVR 
  hide details  
Reply
post #2 of 9
#include "avr/io.h"
#include "util/delay.h"
Pepe Silvia
(13 items)
 
  
CPUMotherboardGraphicsRAM
255 @ 4 Ghz MSI 870-C45 GT 520 @ 1Ghz Crucial Rendition 4GB DDR3 
Hard DriveOSMonitorPower
Hitachi 1TB Win 7 19" 420W 
  hide details  
Reply
Pepe Silvia
(13 items)
 
  
CPUMotherboardGraphicsRAM
255 @ 4 Ghz MSI 870-C45 GT 520 @ 1Ghz Crucial Rendition 4GB DDR3 
Hard DriveOSMonitorPower
Hitachi 1TB Win 7 19" 420W 
  hide details  
Reply
post #3 of 9
Thread Starter 
What about the void issue?
     
CPUMotherboardGraphicsRAM
i7-2600k @ 4.7Ghz @ 1.376V Asus P8Z68-V Pro Sapphire HD6970 Patriot Viper II Sector 5 16Gb@1600 
Hard DriveOptical DriveCoolingOS
Hitachi Deskstar 2TB 7400rpm 64 mb SATAIII LG Blu-Ray Burner 12X Corsair H100 Windows 7 Professional 64-bit 
MonitorMonitorMonitorKeyboard
Samsung T240HD Samsung Syncmaster 2233 Samsung T240HD Lenovo Generic 
PowerCaseMouseMouse Pad
Thermaltake TR2 RX 850W CoolerMaster HAF 932 Advanced Sensei Raw Walmart Pad 
AudioAudioAudioAudio
Logitech Z-2300 Audio-Technica Pro700MKII Shure SRH240 Bose AE2 
OtherOtherOther
WD Elements 1.5TB Nexus 7 Blue Yeti 
CPUGraphicsRAMHard Drive
i7 3610qm GTX 670M 16 GB @ 1600 500GB x 2 in Raid 0 
Optical DriveCoolingOSMonitor
MSI IC Diamond 7 Home Premium 15.6 1080p Matte 
KeyboardPowerCaseAudio
MSI with Steelseries 180W AC Adapter MSI 16F3/GT60 Dynaudio Built-in 
CPUMotherboardGraphicsRAM
Intel Q8200 Gateway SN nVidia GT220 8GB DDR3 1333 
Hard DriveOptical DriveCoolingOS
Hitachi 640GB H-L DVD Burner Stock Windows 7 HP 64-bit 
MonitorKeyboardPowerCase
Samsung 46" LCD Logitech Wireless w/ mouse 500W Thermaltake Antec Two Hundred v2 
MouseAudio
Logitech Samsung 1000W 5.1 AVR 
  hide details  
Reply
     
CPUMotherboardGraphicsRAM
i7-2600k @ 4.7Ghz @ 1.376V Asus P8Z68-V Pro Sapphire HD6970 Patriot Viper II Sector 5 16Gb@1600 
Hard DriveOptical DriveCoolingOS
Hitachi Deskstar 2TB 7400rpm 64 mb SATAIII LG Blu-Ray Burner 12X Corsair H100 Windows 7 Professional 64-bit 
MonitorMonitorMonitorKeyboard
Samsung T240HD Samsung Syncmaster 2233 Samsung T240HD Lenovo Generic 
PowerCaseMouseMouse Pad
Thermaltake TR2 RX 850W CoolerMaster HAF 932 Advanced Sensei Raw Walmart Pad 
AudioAudioAudioAudio
Logitech Z-2300 Audio-Technica Pro700MKII Shure SRH240 Bose AE2 
OtherOtherOther
WD Elements 1.5TB Nexus 7 Blue Yeti 
CPUGraphicsRAMHard Drive
i7 3610qm GTX 670M 16 GB @ 1600 500GB x 2 in Raid 0 
Optical DriveCoolingOSMonitor
MSI IC Diamond 7 Home Premium 15.6 1080p Matte 
KeyboardPowerCaseAudio
MSI with Steelseries 180W AC Adapter MSI 16F3/GT60 Dynaudio Built-in 
CPUMotherboardGraphicsRAM
Intel Q8200 Gateway SN nVidia GT220 8GB DDR3 1333 
Hard DriveOptical DriveCoolingOS
Hitachi 640GB H-L DVD Burner Stock Windows 7 HP 64-bit 
MonitorKeyboardPowerCase
Samsung 46" LCD Logitech Wireless w/ mouse 500W Thermaltake Antec Two Hundred v2 
MouseAudio
Logitech Samsung 1000W 5.1 AVR 
  hide details  
Reply
post #4 of 9
Thread Starter 
Bump.

I have tried to quotes, It says that it can't include the file. What's going on?
     
CPUMotherboardGraphicsRAM
i7-2600k @ 4.7Ghz @ 1.376V Asus P8Z68-V Pro Sapphire HD6970 Patriot Viper II Sector 5 16Gb@1600 
Hard DriveOptical DriveCoolingOS
Hitachi Deskstar 2TB 7400rpm 64 mb SATAIII LG Blu-Ray Burner 12X Corsair H100 Windows 7 Professional 64-bit 
MonitorMonitorMonitorKeyboard
Samsung T240HD Samsung Syncmaster 2233 Samsung T240HD Lenovo Generic 
PowerCaseMouseMouse Pad
Thermaltake TR2 RX 850W CoolerMaster HAF 932 Advanced Sensei Raw Walmart Pad 
AudioAudioAudioAudio
Logitech Z-2300 Audio-Technica Pro700MKII Shure SRH240 Bose AE2 
OtherOtherOther
WD Elements 1.5TB Nexus 7 Blue Yeti 
CPUGraphicsRAMHard Drive
i7 3610qm GTX 670M 16 GB @ 1600 500GB x 2 in Raid 0 
Optical DriveCoolingOSMonitor
MSI IC Diamond 7 Home Premium 15.6 1080p Matte 
KeyboardPowerCaseAudio
MSI with Steelseries 180W AC Adapter MSI 16F3/GT60 Dynaudio Built-in 
CPUMotherboardGraphicsRAM
Intel Q8200 Gateway SN nVidia GT220 8GB DDR3 1333 
Hard DriveOptical DriveCoolingOS
Hitachi 640GB H-L DVD Burner Stock Windows 7 HP 64-bit 
MonitorKeyboardPowerCase
Samsung 46" LCD Logitech Wireless w/ mouse 500W Thermaltake Antec Two Hundred v2 
MouseAudio
Logitech Samsung 1000W 5.1 AVR 
  hide details  
Reply
     
CPUMotherboardGraphicsRAM
i7-2600k @ 4.7Ghz @ 1.376V Asus P8Z68-V Pro Sapphire HD6970 Patriot Viper II Sector 5 16Gb@1600 
Hard DriveOptical DriveCoolingOS
Hitachi Deskstar 2TB 7400rpm 64 mb SATAIII LG Blu-Ray Burner 12X Corsair H100 Windows 7 Professional 64-bit 
MonitorMonitorMonitorKeyboard
Samsung T240HD Samsung Syncmaster 2233 Samsung T240HD Lenovo Generic 
PowerCaseMouseMouse Pad
Thermaltake TR2 RX 850W CoolerMaster HAF 932 Advanced Sensei Raw Walmart Pad 
AudioAudioAudioAudio
Logitech Z-2300 Audio-Technica Pro700MKII Shure SRH240 Bose AE2 
OtherOtherOther
WD Elements 1.5TB Nexus 7 Blue Yeti 
CPUGraphicsRAMHard Drive
i7 3610qm GTX 670M 16 GB @ 1600 500GB x 2 in Raid 0 
Optical DriveCoolingOSMonitor
MSI IC Diamond 7 Home Premium 15.6 1080p Matte 
KeyboardPowerCaseAudio
MSI with Steelseries 180W AC Adapter MSI 16F3/GT60 Dynaudio Built-in 
CPUMotherboardGraphicsRAM
Intel Q8200 Gateway SN nVidia GT220 8GB DDR3 1333 
Hard DriveOptical DriveCoolingOS
Hitachi 640GB H-L DVD Burner Stock Windows 7 HP 64-bit 
MonitorKeyboardPowerCase
Samsung 46" LCD Logitech Wireless w/ mouse 500W Thermaltake Antec Two Hundred v2 
MouseAudio
Logitech Samsung 1000W 5.1 AVR 
  hide details  
Reply
post #5 of 9
Thread Starter 
Bump. Really need help. I'm counting on OCN.

I tried programming the IC anyway but now the programmer says that the hex file is an empty file.
Any help? anyone?

:foreveralone:
     
CPUMotherboardGraphicsRAM
i7-2600k @ 4.7Ghz @ 1.376V Asus P8Z68-V Pro Sapphire HD6970 Patriot Viper II Sector 5 16Gb@1600 
Hard DriveOptical DriveCoolingOS
Hitachi Deskstar 2TB 7400rpm 64 mb SATAIII LG Blu-Ray Burner 12X Corsair H100 Windows 7 Professional 64-bit 
MonitorMonitorMonitorKeyboard
Samsung T240HD Samsung Syncmaster 2233 Samsung T240HD Lenovo Generic 
PowerCaseMouseMouse Pad
Thermaltake TR2 RX 850W CoolerMaster HAF 932 Advanced Sensei Raw Walmart Pad 
AudioAudioAudioAudio
Logitech Z-2300 Audio-Technica Pro700MKII Shure SRH240 Bose AE2 
OtherOtherOther
WD Elements 1.5TB Nexus 7 Blue Yeti 
CPUGraphicsRAMHard Drive
i7 3610qm GTX 670M 16 GB @ 1600 500GB x 2 in Raid 0 
Optical DriveCoolingOSMonitor
MSI IC Diamond 7 Home Premium 15.6 1080p Matte 
KeyboardPowerCaseAudio
MSI with Steelseries 180W AC Adapter MSI 16F3/GT60 Dynaudio Built-in 
CPUMotherboardGraphicsRAM
Intel Q8200 Gateway SN nVidia GT220 8GB DDR3 1333 
Hard DriveOptical DriveCoolingOS
Hitachi 640GB H-L DVD Burner Stock Windows 7 HP 64-bit 
MonitorKeyboardPowerCase
Samsung 46" LCD Logitech Wireless w/ mouse 500W Thermaltake Antec Two Hundred v2 
MouseAudio
Logitech Samsung 1000W 5.1 AVR 
  hide details  
Reply
     
CPUMotherboardGraphicsRAM
i7-2600k @ 4.7Ghz @ 1.376V Asus P8Z68-V Pro Sapphire HD6970 Patriot Viper II Sector 5 16Gb@1600 
Hard DriveOptical DriveCoolingOS
Hitachi Deskstar 2TB 7400rpm 64 mb SATAIII LG Blu-Ray Burner 12X Corsair H100 Windows 7 Professional 64-bit 
MonitorMonitorMonitorKeyboard
Samsung T240HD Samsung Syncmaster 2233 Samsung T240HD Lenovo Generic 
PowerCaseMouseMouse Pad
Thermaltake TR2 RX 850W CoolerMaster HAF 932 Advanced Sensei Raw Walmart Pad 
AudioAudioAudioAudio
Logitech Z-2300 Audio-Technica Pro700MKII Shure SRH240 Bose AE2 
OtherOtherOther
WD Elements 1.5TB Nexus 7 Blue Yeti 
CPUGraphicsRAMHard Drive
i7 3610qm GTX 670M 16 GB @ 1600 500GB x 2 in Raid 0 
Optical DriveCoolingOSMonitor
MSI IC Diamond 7 Home Premium 15.6 1080p Matte 
KeyboardPowerCaseAudio
MSI with Steelseries 180W AC Adapter MSI 16F3/GT60 Dynaudio Built-in 
CPUMotherboardGraphicsRAM
Intel Q8200 Gateway SN nVidia GT220 8GB DDR3 1333 
Hard DriveOptical DriveCoolingOS
Hitachi 640GB H-L DVD Burner Stock Windows 7 HP 64-bit 
MonitorKeyboardPowerCase
Samsung 46" LCD Logitech Wireless w/ mouse 500W Thermaltake Antec Two Hundred v2 
MouseAudio
Logitech Samsung 1000W 5.1 AVR 
  hide details  
Reply
post #6 of 9
Quote:
Originally Posted by DJDannyV View Post

What about the void issue?

I'm not familiar with the ATTiny2313 IC but have you tried removing the void from the function prototype?
Code:
void getKeyPress();
Fractal Design
(15 items)
 
775 4 life
(15 items)
 
 
CPUMotherboardGraphicsRAM
Intel i7 2600K Biostar TP67XE NVidia GTX 570 Crucial Ballistix 
Hard DriveHard DriveCoolingOS
Crucial C300 RealSSD SDD Samsung F4 2TB Noctua NH-D14 Windows 7 Professional x64 
MonitorMonitorKeyboardPower
Asus VH202T 20'' 1600x900 Acer P244W 24" 1920 x 1080 Apple Keyboard with Numeric Keypad SeaSonic M12II 620W 
CaseMouseAudio
Fractal Design Define XL Titanium Grey Razor Abyssus Creative Sound Blaster X-FI Xtreme Gamer 
CPUMotherboardGraphicsRAM
Intel X3350 3.2Ghz @ 1.25v Gigabyte-GA-P35-DS3L (rev 2) XFX 4870 1GB 4GB OCZ Reaper PC2-6400 
RAMHard DriveHard DriveOptical Drive
2GB Corsair XMS2 PC2-6400 Crucial C300 64GB SSD 2TB Samsung Spinpoint F4 Sony Super Multi 
OSMonitorPowerCase
Windows 7 Professional x64 SP1 Asus VH202T 20'' 1600x900 SeaSonic M12II 620W Cooler Master Centurion 5 
Mouse
Razor Abyssus 
CPUMotherboardGraphicsRAM
Core i5-520M Lenovo 2522BF3 NVIDIA® Quadro® NVS3100M  Ramaxel Technology 4Gb DDR3 
Hard DriveOptical DriveOSMonitor
Samsung SSD 128GB 1.8" Micro SATA  hl-dt-st dvdram gu10n Windows 7 Enterprise (64-bit) 14.1" WXGA (1280x800) display, anti-glare, LED ... 
Power
9-cell plus Slice battery 
  hide details  
Reply
Fractal Design
(15 items)
 
775 4 life
(15 items)
 
 
CPUMotherboardGraphicsRAM
Intel i7 2600K Biostar TP67XE NVidia GTX 570 Crucial Ballistix 
Hard DriveHard DriveCoolingOS
Crucial C300 RealSSD SDD Samsung F4 2TB Noctua NH-D14 Windows 7 Professional x64 
MonitorMonitorKeyboardPower
Asus VH202T 20'' 1600x900 Acer P244W 24" 1920 x 1080 Apple Keyboard with Numeric Keypad SeaSonic M12II 620W 
CaseMouseAudio
Fractal Design Define XL Titanium Grey Razor Abyssus Creative Sound Blaster X-FI Xtreme Gamer 
CPUMotherboardGraphicsRAM
Intel X3350 3.2Ghz @ 1.25v Gigabyte-GA-P35-DS3L (rev 2) XFX 4870 1GB 4GB OCZ Reaper PC2-6400 
RAMHard DriveHard DriveOptical Drive
2GB Corsair XMS2 PC2-6400 Crucial C300 64GB SSD 2TB Samsung Spinpoint F4 Sony Super Multi 
OSMonitorPowerCase
Windows 7 Professional x64 SP1 Asus VH202T 20'' 1600x900 SeaSonic M12II 620W Cooler Master Centurion 5 
Mouse
Razor Abyssus 
CPUMotherboardGraphicsRAM
Core i5-520M Lenovo 2522BF3 NVIDIA® Quadro® NVS3100M  Ramaxel Technology 4Gb DDR3 
Hard DriveOptical DriveOSMonitor
Samsung SSD 128GB 1.8" Micro SATA  hl-dt-st dvdram gu10n Windows 7 Enterprise (64-bit) 14.1" WXGA (1280x800) display, anti-glare, LED ... 
Power
9-cell plus Slice battery 
  hide details  
Reply
post #7 of 9
Thread Starter 
Quote:
Originally Posted by travesty View Post

I'm not familiar with the ATTiny2313 IC but have you tried removing the void from the function prototype?
Code:
void getKeyPress();

Tried that. Nothing. It seems like it's more of an issue with the program, rather than the code? Because the include files cannot be found, and they're supposed to be in the program that I'm using. I'm using AVStudio5. The programmer I'm trying to use is the EMP-100. It has support for the ATTiny2313 but when I load the code, it says that the hex file is empty. ASCII and the other type of hex give the same error.
     
CPUMotherboardGraphicsRAM
i7-2600k @ 4.7Ghz @ 1.376V Asus P8Z68-V Pro Sapphire HD6970 Patriot Viper II Sector 5 16Gb@1600 
Hard DriveOptical DriveCoolingOS
Hitachi Deskstar 2TB 7400rpm 64 mb SATAIII LG Blu-Ray Burner 12X Corsair H100 Windows 7 Professional 64-bit 
MonitorMonitorMonitorKeyboard
Samsung T240HD Samsung Syncmaster 2233 Samsung T240HD Lenovo Generic 
PowerCaseMouseMouse Pad
Thermaltake TR2 RX 850W CoolerMaster HAF 932 Advanced Sensei Raw Walmart Pad 
AudioAudioAudioAudio
Logitech Z-2300 Audio-Technica Pro700MKII Shure SRH240 Bose AE2 
OtherOtherOther
WD Elements 1.5TB Nexus 7 Blue Yeti 
CPUGraphicsRAMHard Drive
i7 3610qm GTX 670M 16 GB @ 1600 500GB x 2 in Raid 0 
Optical DriveCoolingOSMonitor
MSI IC Diamond 7 Home Premium 15.6 1080p Matte 
KeyboardPowerCaseAudio
MSI with Steelseries 180W AC Adapter MSI 16F3/GT60 Dynaudio Built-in 
CPUMotherboardGraphicsRAM
Intel Q8200 Gateway SN nVidia GT220 8GB DDR3 1333 
Hard DriveOptical DriveCoolingOS
Hitachi 640GB H-L DVD Burner Stock Windows 7 HP 64-bit 
MonitorKeyboardPowerCase
Samsung 46" LCD Logitech Wireless w/ mouse 500W Thermaltake Antec Two Hundred v2 
MouseAudio
Logitech Samsung 1000W 5.1 AVR 
  hide details  
Reply
     
CPUMotherboardGraphicsRAM
i7-2600k @ 4.7Ghz @ 1.376V Asus P8Z68-V Pro Sapphire HD6970 Patriot Viper II Sector 5 16Gb@1600 
Hard DriveOptical DriveCoolingOS
Hitachi Deskstar 2TB 7400rpm 64 mb SATAIII LG Blu-Ray Burner 12X Corsair H100 Windows 7 Professional 64-bit 
MonitorMonitorMonitorKeyboard
Samsung T240HD Samsung Syncmaster 2233 Samsung T240HD Lenovo Generic 
PowerCaseMouseMouse Pad
Thermaltake TR2 RX 850W CoolerMaster HAF 932 Advanced Sensei Raw Walmart Pad 
AudioAudioAudioAudio
Logitech Z-2300 Audio-Technica Pro700MKII Shure SRH240 Bose AE2 
OtherOtherOther
WD Elements 1.5TB Nexus 7 Blue Yeti 
CPUGraphicsRAMHard Drive
i7 3610qm GTX 670M 16 GB @ 1600 500GB x 2 in Raid 0 
Optical DriveCoolingOSMonitor
MSI IC Diamond 7 Home Premium 15.6 1080p Matte 
KeyboardPowerCaseAudio
MSI with Steelseries 180W AC Adapter MSI 16F3/GT60 Dynaudio Built-in 
CPUMotherboardGraphicsRAM
Intel Q8200 Gateway SN nVidia GT220 8GB DDR3 1333 
Hard DriveOptical DriveCoolingOS
Hitachi 640GB H-L DVD Burner Stock Windows 7 HP 64-bit 
MonitorKeyboardPowerCase
Samsung 46" LCD Logitech Wireless w/ mouse 500W Thermaltake Antec Two Hundred v2 
MouseAudio
Logitech Samsung 1000W 5.1 AVR 
  hide details  
Reply
post #8 of 9
Thread Starter 
Hopeful bump...
     
CPUMotherboardGraphicsRAM
i7-2600k @ 4.7Ghz @ 1.376V Asus P8Z68-V Pro Sapphire HD6970 Patriot Viper II Sector 5 16Gb@1600 
Hard DriveOptical DriveCoolingOS
Hitachi Deskstar 2TB 7400rpm 64 mb SATAIII LG Blu-Ray Burner 12X Corsair H100 Windows 7 Professional 64-bit 
MonitorMonitorMonitorKeyboard
Samsung T240HD Samsung Syncmaster 2233 Samsung T240HD Lenovo Generic 
PowerCaseMouseMouse Pad
Thermaltake TR2 RX 850W CoolerMaster HAF 932 Advanced Sensei Raw Walmart Pad 
AudioAudioAudioAudio
Logitech Z-2300 Audio-Technica Pro700MKII Shure SRH240 Bose AE2 
OtherOtherOther
WD Elements 1.5TB Nexus 7 Blue Yeti 
CPUGraphicsRAMHard Drive
i7 3610qm GTX 670M 16 GB @ 1600 500GB x 2 in Raid 0 
Optical DriveCoolingOSMonitor
MSI IC Diamond 7 Home Premium 15.6 1080p Matte 
KeyboardPowerCaseAudio
MSI with Steelseries 180W AC Adapter MSI 16F3/GT60 Dynaudio Built-in 
CPUMotherboardGraphicsRAM
Intel Q8200 Gateway SN nVidia GT220 8GB DDR3 1333 
Hard DriveOptical DriveCoolingOS
Hitachi 640GB H-L DVD Burner Stock Windows 7 HP 64-bit 
MonitorKeyboardPowerCase
Samsung 46" LCD Logitech Wireless w/ mouse 500W Thermaltake Antec Two Hundred v2 
MouseAudio
Logitech Samsung 1000W 5.1 AVR 
  hide details  
Reply
     
CPUMotherboardGraphicsRAM
i7-2600k @ 4.7Ghz @ 1.376V Asus P8Z68-V Pro Sapphire HD6970 Patriot Viper II Sector 5 16Gb@1600 
Hard DriveOptical DriveCoolingOS
Hitachi Deskstar 2TB 7400rpm 64 mb SATAIII LG Blu-Ray Burner 12X Corsair H100 Windows 7 Professional 64-bit 
MonitorMonitorMonitorKeyboard
Samsung T240HD Samsung Syncmaster 2233 Samsung T240HD Lenovo Generic 
PowerCaseMouseMouse Pad
Thermaltake TR2 RX 850W CoolerMaster HAF 932 Advanced Sensei Raw Walmart Pad 
AudioAudioAudioAudio
Logitech Z-2300 Audio-Technica Pro700MKII Shure SRH240 Bose AE2 
OtherOtherOther
WD Elements 1.5TB Nexus 7 Blue Yeti 
CPUGraphicsRAMHard Drive
i7 3610qm GTX 670M 16 GB @ 1600 500GB x 2 in Raid 0 
Optical DriveCoolingOSMonitor
MSI IC Diamond 7 Home Premium 15.6 1080p Matte 
KeyboardPowerCaseAudio
MSI with Steelseries 180W AC Adapter MSI 16F3/GT60 Dynaudio Built-in 
CPUMotherboardGraphicsRAM
Intel Q8200 Gateway SN nVidia GT220 8GB DDR3 1333 
Hard DriveOptical DriveCoolingOS
Hitachi 640GB H-L DVD Burner Stock Windows 7 HP 64-bit 
MonitorKeyboardPowerCase
Samsung 46" LCD Logitech Wireless w/ mouse 500W Thermaltake Antec Two Hundred v2 
MouseAudio
Logitech Samsung 1000W 5.1 AVR 
  hide details  
Reply
post #9 of 9
One thing you can try is using the full path to the include files in quotes. Quotes infer a direct path, the <> infer what is in your include path during compile. It sounds like your build environment isn't setup right if it can't find those includes. This error may be messing with the prototype for your other function causing that error as well. I would focus on fixing the include error first.

I'm a big Atmel micro fan myself. Used them all through undergrad and still play with them now. Last summer I started work on a true multiprocess OS for the ATMega where you could actually run multiple separately compiled binaries. I never got to the point where I put it on silicon, but I ran it in the simulator and successfully contexted switched between the OS and a completely separate binary from a different project. Haven't worked on it since, but take a look at the code if you're bored:

http://code.google.com/p/mpak/source/browse/trunk/

The 2313 was by favorite Tiny because of the HW supported UART channel. I have dozens of Tinys and Megas sitting in my parts bins now lol thumb.gif
    
CPUMotherboardGraphicsRAM
11x P4s, 3x PDs (all 3.2 to 3.4Ghz) 14x HP mobos Why? 14x 1GB 
Hard DriveOptical DriveOSMonitor
1x 160GB SATA Yeah Ubuntu Lucid SSH 
PowerCase
9x 300W HP supplies 5 Threaded rods 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
11x P4s, 3x PDs (all 3.2 to 3.4Ghz) 14x HP mobos Why? 14x 1GB 
Hard DriveOptical DriveOSMonitor
1x 160GB SATA Yeah Ubuntu Lucid SSH 
PowerCase
9x 300W HP supplies 5 Threaded rods 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Coding and Programming
Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › ATTiny Matrix Binary Calculator