Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.

PIC16F887 problem sa funkcijama

[es] :: Elektronika :: Mikrokontroleri :: PIC16F887 problem sa funkcijama

Strane: < .. 1 2 3

[ Pregleda: 6647 | Odgovora: 40 ] > FB > Twit

Postavi temu Odgovori

Autor

Pretraga teme: Traži
Markiranje Štampanje RSS

goran_68

Član broj: 89012
Poruke: 932
*.dynamic.isp.telekom.rs.



+81 Profil

icon Re: PIC16F887 problem sa funkcijama26.02.2013. u 17:29 - pre 135 meseci
Primer iz uputstva:

Code:

//The following is a simple code example illustrating the SSP module configured for I2C
master communication. The routine illustrates I2C communications with a Microchip 24LC01B
I2C EE memory device.
#include "p18cxx.h"
#include "i2c.h"
unsigned char arraywr[] = {1,2,3,4,5,6,7,8,0};
unsigned char arrayrd[20];
//***************************************************
void main(void)
{
OpenI2C(MASTER, SLEW_ON);// Initialize I2C module
SSPADD = 9; //400kHz Baud clock(9) @16MHz
//100kHz Baud clock(39) @16MHz
while(1)
{
EEByteWrite(0xA0, 0x30, 0xA5);
EEAckPolling(0xA0);
EECurrentAddRead(0xA0);
EEPageWrite(0xA0, 0x70, arraywr);
EEAckPolling(0xA0);
EESequentialRead(0xA0, 0x70, arrayrd, 20);
EERandomRead(0xA0,0x30);
}
}

gorankg
 
Odgovor na temu

[es] :: Elektronika :: Mikrokontroleri :: PIC16F887 problem sa funkcijama

Strane: < .. 1 2 3

[ Pregleda: 6647 | Odgovora: 40 ] > FB > Twit

Postavi temu Odgovori

Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.