Author |
Message |
Topic: set port for 16f873 |
arys
Replies: 5
Views: 7696
|
Forum: General CCS C Discussion Posted: Thu Mar 06, 2008 6:25 pm Subject: set port for 16f873 |
forgot to tell you. when i use
--> #include <16F877A.h>
no error in output box |
Topic: set port for 16f873 |
arys
Replies: 5
Views: 7696
|
Forum: General CCS C Discussion Posted: Thu Mar 06, 2008 6:22 pm Subject: set port for 16f873 |
drh ; I did set_tris_b(0x00); but the output box said error. s'thing involved with declaration. Still dont know. very simple codes.
Ttelmah; here are the codes.
#define (_PCM_)
#include ... |
Topic: set port for 16f873 |
arys
Replies: 5
Views: 7696
|
Forum: General CCS C Discussion Posted: Wed Mar 05, 2008 11:17 pm Subject: set port for 16f873 |
hi.
I want to set port b as output port.
here are the code. but it doesnt work. does anybody know? it only work if output_high(PIN_Bx). I do not understand?
#byte PORTB=0x06
#byte PORTC=0x07
... |
Topic: PIC's variable changing through PC |
arys
Replies: 15
Views: 13972
|
Forum: General CCS C Discussion Posted: Tue Mar 04, 2008 3:31 am Subject: PIC's variable changing through PC |
yes, it's initial value. then i hope i can change the x value through pc.
Which pin of the pic is the output?can i set myself for example port b0 as our output?
--> actually we can each pin ... |
Topic: PIC's variable changing through PC |
arys
Replies: 15
Views: 13972
|
Forum: General CCS C Discussion Posted: Wed Feb 20, 2008 4:00 am Subject: PIC's variable changing through PC |
many thanks. I try to use siow but nothing happen. what i did was, open siow --> open file **.c --> send hex number.
How to use siow correctly? |
Topic: PIC's variable changing through PC |
arys
Replies: 15
Views: 13972
|
Forum: General CCS C Discussion Posted: Tue Feb 19, 2008 3:39 am Subject: see output/result |
thanks D-Kens. I add few function. seems like it work.
c_ptr=&c;
strcpy(string,c_ptr);
x=atoi(string);
but how can I see the result of x, since I only have CCS and M ... |
Topic: PIC's variable changing through PC |
arys
Replies: 15
Views: 13972
|
Forum: General CCS C Discussion Posted: Thu Feb 14, 2008 2:58 am Subject: generate ~16khz pulses ??? |
Hi, thanks for the ideas. I've tried out. but its not work. when I send any 0-255 from VB it generates ~16kHz. then it doesnt want to change the second value (from VB). seems like int_rda doesnt work. ... |
Topic: Rx problem |
arys
Replies: 2
Views: 3148
|
Forum: General CCS C Discussion Posted: Wed Jan 23, 2008 10:04 pm Subject: Rx problem |
sorry...
just delete the post. I will not do it again. |
Topic: lost in string receiving |
arys
Replies: 1
Views: 3606
|
Forum: General CCS C Discussion Posted: Tue Jan 22, 2008 3:05 am Subject: lost in string receiving |
Hi..
I'm working with sending string from pc to PIC to get the whole string. I tried many ways but seems like silly. I think I already ask before and thanks to give me suggestion but still I can not ... |
Topic: Rx problem |
arys
Replies: 2
Views: 3148
|
Forum: General CCS C Discussion Posted: Mon Jan 21, 2008 3:52 am Subject: Rx problem |
Hi.
as I know PIC receive 8bit character at Rx. But i want PIC receive string from PC. I'm using getc() function to get string input and it's not work. Is there any function could convert or receive ... |
Topic: Very simple Q about output |
arys
Replies: 9
Views: 8506
|
Forum: General CCS C Discussion Posted: Mon Jan 21, 2008 3:40 am Subject: Very simple Q about output |
thanks PCM. I've change to output_b(0b00000001). then its OK. |
Topic: Very simple Q about output |
arys
Replies: 9
Views: 8506
|
Forum: General CCS C Discussion Posted: Sun Jan 20, 2008 7:50 pm Subject: Very simple Q about output |
but when i change to this code, only pinB5 ON only for 1s.
set_tris_b(0x00); //set port b as output
output_b (0x00); //init all output pins as low
while(1)
{
... |
Topic: Very simple Q about output |
arys
Replies: 9
Views: 8506
|
Forum: General CCS C Discussion Posted: Sun Jan 20, 2008 6:58 pm Subject: Very simple Q about output |
thanks. thats clear.
since getc() return character but I need the binary (ascii) number. so, i have to convert the 8bit character to 8bit integer. is it correct?
I look into sprintf(), printf() but ... |
Topic: Very simple Q about output |
arys
Replies: 9
Views: 8506
|
Forum: General CCS C Discussion Posted: Sat Jan 19, 2008 9:43 pm Subject: Very simple Q about output |
thanks for the ideas. For beginning I start with very simple code. I try to send byte data from VB (which I use mscomm1.output=chr$(XX)). and received by PIC trough port B (which I set up Port B as ou ... |
Topic: Very simple Q about output |
arys
Replies: 9
Views: 8506
|
Forum: General CCS C Discussion Posted: Thu Jan 17, 2008 7:26 pm Subject: Very simple Q about output |
for information, i'm using 16f873 and max232 to interface to PC. Is it possible to send and receive 2 variables from PC to PIC and run at the same time. if not, how to change 2 variables in PIC from V ... |
|