This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <conio.h> | |
#include <math.h> | |
//Problem 3 | |
/* | |
main(){ | |
int a, b=0; | |
printf(" Enter an intager: "); | |
scanf(" %d", &a); | |
while(b<=10){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Homework #3 | |
//Joshua held | |
//Problems 3, 4, 10, 12, 13, 14, 15, 16 | |
#include <stdio.h> | |
#include <conio.h> | |
#include <math.h> | |
//Problem 3 | |
/* | |
main(){ | |
int a, b=0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Lab 5 | |
//Joshua Held | |
//Wed pm embedded programing spring | |
#include<stdio.h> | |
#include<conio.h> | |
#include<math.h> | |
#define null '\0' | |
/* | |
int stringlength(char *arrayaddress); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//design problem 1 | |
#include <stdio.h> | |
#include <conio.h> | |
void binaryprint(int x); | |
main(){ | |
int x=0; | |
printf("Print the Binary format of 1-20 \n"); | |
while(x<=20){ | |
binaryprint(x); | |
x++; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <conio.h> | |
#include <math.h> | |
/* Typing exercise | |
void binaryprint(int x); | |
main(){ | |
int input; | |
printf("please enter a number: "); | |
scanf(" %d", &input); | |
binaryprint(input); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <conio.h> | |
#include <stdio.h> | |
#include <math.h> | |
// Josh Held 4/22/15 | |
//Design 1 | |
/* | |
struct distance{ | |
int ft; | |
int in;}d1, d2, result; | |
main(){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Enter file contents here#include <18f4520.h> | |
#use delay(clock=20000000) | |
#fuses HS, NOWDT, NOLVP | |
#include "../Library/18f4520ptr.h" | |
/* | |
main(){ | |
*TRISC=0x00; | |
while(1){ | |
*PORTC^=0x01; | |
delay_ms(100); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <18f4520.h> | |
#use delay(clock=20000000) | |
#fuses HS, NOWDT, NOLVP | |
#include "../Library/18f4520ptr.h" | |
/* | |
main(){ | |
*TRISC=0x00; | |
while(1){ | |
*PORTC^=0x01; | |
delay_ms(100); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <18f4520.h> | |
#use delay(clock=20000000) | |
#fuses HS, NOWDT, NOLVP | |
#include "../Library/18f4520ptr.h" | |
#include "../Library/modifiedlcd.h" | |
float Vres=6.0/1023.0; | |
float Voltage; | |
float Vmin=3; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//GPIO | |
int *TRISA=0xF92, *TRISB=0xF93, *TRISC=0xF94; | |
int *PORTA=0xF80, *PORTB=0xF81, *PORTC=0xF82; | |
// Analog to Digital | |
int16 *Q=0xFC3; | |
struct _ADCON0{ | |
int ADON:1; |
OlderNewer