Author |
Message |
Topic: I2C slave transmitting data |
iVoVa
Replies: 47
Views: 93860
|
Forum: General CCS C Discussion Posted: Thu Mar 17, 2011 10:59 am Subject: I2C slave transmitting data |
I have a source code about transfer and receive data between MASTER and SLAVE with I2C connect.
Hope it useful for the persons need it.
http://www.mediafire.com/file/l0eq4tuodd5sa1h/I2C%20transfe ... |
Topic: Proteus I2C have a problem, help me ! |
iVoVa
Replies: 2
Views: 7786
|
Forum: General CCS C Discussion Posted: Thu Mar 17, 2011 5:36 am Subject: Proteus I2C have a problem, help me ! |
Thanks PCM so much, you help me get a lot of knowledges.
My program worked. |
Topic: Proteus I2C have a problem, help me ! |
iVoVa
Replies: 2
Views: 7786
|
Forum: General CCS C Discussion Posted: Wed Mar 16, 2011 11:16 pm Subject: Proteus I2C have a problem, help me ! |
#include<18F4520.h>
#include"DEF_18F4520.c"
#fuses HS
#use delay(clock = 4000000)
#use I2C(MASTER , SDA = PIN_C4, SCL = PIN_C3)
#use FAST_IO( A B)
#use FA ... |
Topic: Proteus run incorrect with SPI between 2 PIC18, help me ! |
iVoVa
Replies: 2
Views: 5481
|
Forum: General CCS C Discussion Posted: Tue Mar 15, 2011 3:55 am Subject: Proteus run incorrect with SPI between 2 PIC18, help me ! |
hmmm... you're using fast_io() but where's your setup of the tris registers ?
Have you disabled other peripherals you don't use ?
Do you need a chip select for the slave ?
Your hardware for switch ... |
Topic: Proteus run incorrect with SPI between 2 PIC18, help me ! |
iVoVa
Replies: 2
Views: 5481
|
Forum: General CCS C Discussion Posted: Mon Mar 14, 2011 1:17 pm Subject: Proteus run incorrect with SPI between 2 PIC18, help me ! |
#include<18F4520.h>
#use delay(clock=4000000)
#use FAST_IO(D)
void main()
{
int number;
setup_spi(SPI_MASTER );
while(1)
{
nu ... |
Topic: Explain about code timer0, help me ! |
iVoVa
Replies: 2
Views: 5865
|
Forum: General CCS C Discussion Posted: Sun Mar 13, 2011 6:58 am Subject: Explain about code timer0, help me ! |
@Ttelmah : Thanks for helping ! |
Topic: Explain about code timer0, help me ! |
iVoVa
Replies: 2
Views: 5865
|
Forum: General CCS C Discussion Posted: Sat Mar 12, 2011 11:39 pm Subject: Explain about code timer0, help me ! |
#include <18F4520.h>
#fuses NOWDT,PUT,XT,NOPROTECT
#use delay(clock=4000000)
#byte PORTB = 0xF81
int16 count = 0;
int8 a;
//Chuong trinh ngat TMR0
#int_timer0
void interrupt_ ... |
|