Author |
Message |
Topic: logic operation |
mayai
Replies: 7
Views: 7423
|
Forum: General CCS C Discussion Posted: Fri Jan 15, 2010 11:27 am Subject: logic operation |
ok thanks... here's the test code that i've upgrade thanks to wayne......
#include <16f877a.h>
#device adc=8
#use delay(clock=20000000)
#fuses hs, noprotect,nowdt,nolvp
#byte PORTB= ... |
Topic: logic operation |
mayai
Replies: 7
Views: 7423
|
Forum: General CCS C Discussion Posted: Fri Jan 15, 2010 6:58 am Subject: logic operation |
thanks for your suggestion, may i ask
sensor = 0;
set_adc_channel(0); //set to read channel a0 next
delay_us(20);
if (read_adc() < 128)
sensor ... |
Topic: logic operation |
mayai
Replies: 7
Views: 7423
|
Forum: General CCS C Discussion Posted: Fri Jan 15, 2010 3:25 am Subject: logic operation |
i know that this program is actually "stupid" so i tried to use different approach... here's the idea:
1. there are 5 sensors in the program (basically 4 is digitally triggered and only 1 ... |
Topic: logic operation |
mayai
Replies: 7
Views: 7423
|
Forum: General CCS C Discussion Posted: Mon Jan 11, 2010 3:11 am Subject: logic operation |
Hello everybody... I have this code... basically it based on logic operation to get the output... the actual code has 5 logic so it has 32 possibilities.
My main problem is the simulation is workin ... |
Topic: adc multiple channel |
mayai
Replies: 12
Views: 9425
|
Forum: General CCS C Discussion Posted: Sun Dec 20, 2009 1:05 pm Subject: adc multiple channel |
Dear friends, with your help I have this following coding.
#include <16f877a.h>
#device adc=8
#use delay(clock=20000000)
#fuses hs, noprotect,nowdt,nolvp
#define 1 PIN_C0
#define ... |
Topic: adc multiple channel |
mayai
Replies: 12
Views: 9425
|
Forum: General CCS C Discussion Posted: Sun Dec 20, 2009 5:56 am Subject: adc multiple channel |
so far this is the best i could do... maybe if u can tell me what is the proper way to manipulate the data using if i can finished this programs...
that is the only main problem that i've encountered ... |
Topic: adc multiple channel |
mayai
Replies: 12
Views: 9425
|
Forum: General CCS C Discussion Posted: Sat Dec 19, 2009 3:32 pm Subject: adc multiple channel |
Currently the initial code has been repaired. The problem is I still don't get the idea of the if() function. Could you give me a hint please. |
Topic: adc multiple channel |
mayai
Replies: 12
Views: 9425
|
Forum: General CCS C Discussion Posted: Sat Dec 19, 2009 3:21 am Subject: adc multiple channel |
Hello friends I'm new here. I need your help. Thanks in advance.
Okay my problem is that I am developing a mobile robot that solves a maze by using ultrasonic, infrared sensor, etc. The problem is I ... |
|