Author |
Message |
Topic: How does PC communicate with multi-mcus via the RS232? |
stefsun
Replies: 6
Views: 5228
|
Forum: General CCS C Discussion Posted: Thu Nov 13, 2008 7:17 pm Subject: How does PC communicate with multi-mcus via the RS232? |
PC communicates with two mcus, two mcus link with bus.
If first mcu's address is 0X00;the second mcu's address is 0x01.
PC send a address, then the two mcus both receive the address to
judge which ... |
Topic: How to use the serial‘s TXSTA RCSTA |
stefsun
Replies: 1
Views: 5661
|
Forum: General CCS C Discussion Posted: Fri Nov 07, 2008 1:22 am Subject: How to use the serial‘s TXSTA RCSTA |
How to use the serial’s TXSTA RCSTA ? How to set up TXSTA‘s TX9D to judge whether send the address or data ?
I don't find the sample about this for a long time.
Who can help me ? Thanks in a ... |
Topic: how to improve the accuracy of AD Acquisition |
stefsun
Replies: 5
Views: 5605
|
Forum: General CCS C Discussion Posted: Wed Aug 20, 2008 2:26 am Subject: how to improve the accuracy of AD Acquisition |
I used the internal voltage reference,I use 2 AD,2 AD pin are empty.if I use the external voltage reference,is that better? |
Topic: how to improve the accuracy of AD Acquisition |
stefsun
Replies: 5
Views: 5605
|
Forum: General CCS C Discussion Posted: Tue Aug 19, 2008 4:05 am Subject: how to improve the accuracy of AD Acquisition |
I use the pic's AD, but the precision seems not very good. I do not know if there are better way to improve it ? Before acquire the value I give much delay(2ms). I'm using the PIC4523 (12bit AD).
The ... |
Topic: Serial port and I2C problems |
stefsun
Replies: 8
Views: 10156
|
Forum: General CCS C Discussion Posted: Sun Aug 10, 2008 4:56 am Subject: Serial port and I2C problems |
thanks for your replies;
In the code,I use as follings
#use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7, Parity=N, Bits=8, ERRORS)
#use i2c(Master, sda=PIN_C4, scl=PIN_C3,FORCE_HW)
I add 'errors' ... |
Topic: Serial port and I2C problems |
stefsun
Replies: 8
Views: 10156
|
Forum: General CCS C Discussion Posted: Sun Aug 10, 2008 3:30 am Subject: Serial port and I2C problems |
I wrote a function GetI2C(), receiving data via I2C from another microcontroller,
by int_rda the MCU accept instruction from PC,then called this function, and then use int_tbe sent sent to the PC, f ... |
Topic: i2c master&slave problem |
stefsun
Replies: 13
Views: 10408
|
Forum: General CCS C Discussion Posted: Tue Apr 29, 2008 7:09 pm Subject: i2c master&slave problem |
master.c
#include <16F877a.h>
#use delay (clock = 20000000)
#fuses HS, NOWDT,NOPROTECT,NOLVP
#include <lcd.c>
#use i2c(Master, sda=PIN_C4, scl=PIN_C3)
void main ... |
Topic: a conflict variable |
stefsun
Replies: 3
Views: 3974
|
Forum: General CCS C Discussion Posted: Tue Apr 29, 2008 7:14 am Subject: a conflict variable |
thanks Matro and Robert Scott |
Topic: a conflict variable |
stefsun
Replies: 3
Views: 3974
|
Forum: General CCS C Discussion Posted: Tue Apr 29, 2008 2:18 am Subject: a conflict variable |
A variable can be read, and also can write, if there is a conflict, one is reading the variable, and the other is writing the variable. In the case,error will be there. How to solve the problem ?
I ... |
Topic: i2c master&slave problem |
stefsun
Replies: 13
Views: 10408
|
Forum: General CCS C Discussion Posted: Tue Apr 29, 2008 1:53 am Subject: i2c master&slave problem |
thanks every one ,everything is ok |
Topic: i2c master&slave problem |
stefsun
Replies: 13
Views: 10408
|
Forum: General CCS C Discussion Posted: Mon Apr 28, 2008 8:24 am Subject: i2c master&slave problem |
I read all of the replies,I know a lot.thank you Matro,Ttelmah and LEVENT
I understand the #INT_SSP and i2c_isr_state(),send one byte at a time.
master call i2c_read() function,then slave will cal ... |
Topic: i2c master&slave problem |
stefsun
Replies: 13
Views: 10408
|
Forum: General CCS C Discussion Posted: Mon Apr 28, 2008 1:49 am Subject: i2c master&slave problem |
master PIC4523 is unable to receive the value which slave PIC16F877 transmits via the I2C, the PC terminator can't display any letter
the code is following
master
#include <18F4523.h> ... |
Topic: The serial port is unable to receive data with the interrupt |
stefsun
Replies: 5
Views: 12521
|
Forum: General CCS C Discussion Posted: Thu Mar 20, 2008 2:28 am Subject: The serial port is unable to receive data with the interrupt |
The serial port is unable to receive data with the interrupt correctly
In the beginning, Receive data with interrupt and Transmit data with putc, have the following problem. afterward transmit and ... |
Topic: Definition local variable question |
stefsun
Replies: 1
Views: 4370
|
Forum: General CCS C Discussion Posted: Mon Mar 03, 2008 2:47 am Subject: Definition local variable question |
Definition of some local variables, the compiler show
"A numeric expression must appear here"
when they are Defined as global variable ,they are not wrong, do not they can be defined as ... |
Topic: Input pins not working properly |
stefsun
Replies: 2
Views: 3321
|
Forum: General CCS C Discussion Posted: Sat Feb 23, 2008 2:46 am Subject: Input pins not working properly |
set_tris_a(0b10); ->set_tris_a(0x02);
int rf_pass; ->int1 rf_pass; |
|