interfacing MMA7660FC with at89s52
Sun Mar 20 2011, 01:42 pm
You are mixing C and assembly in a wrong way. I suggest you to use I2C driver written in C instead of doing things this way. see the i2c tutorial and download complete code from there.
Sat May 07 2011, 08:35 am
after a looooooooooooooooooong time, but i am baaaaack. lots of stuff had to be done like studying for exam, submitting journals and completing project.... but now i am freeeee. (vivas left though ). but will pick up the project from where i left.
Mon May 09 2011, 06:45 am
say if I want to port my project to Atmega will it be okay?? the system made in 8051 is not reliable.... But..
1. Atmega is new for me. I know a very little about it.
2. but now i have about a month but lots of time to complete the project as all exams will finally be over.
1. Atmega is new for me. I know a very little about it.
2. but now i have about a month but lots of time to complete the project as all exams will finally be over.
Tue May 10 2011, 12:20 am
No problem in porting. You can use inbuilt I2C module of Atmega. will be a good support and gives you more stability on driver level.
You were new to 8051 too isnt it? yeah consider this project as your target and start learning AVR. its a good start after studies are over
You were new to 8051 too isnt it? yeah consider this project as your target and start learning AVR. its a good start after studies are over
Mon May 23 2011, 10:25 pm
Please help with this code. its about pcf8951. I have used the i2c library by ajay bhargav. I also want to see the output serially on the computer. what modifications are to be made so that the output can be viewed serially. Also please check the code. i want the output from channel 0 with input from ainalog input zero. I have also checked the program on keil using the i2c plugin from this site. after read i get a no ack. please help. it is very urgent.
#include <AT89X52.H> #include "I2C_LIB.H" void ini_uart(void); void DelayMs(unsigned int); void sendtopc(unsigned char*); void tx(unsigned char); unsigned char buffer[1]; void main (void) { ini_uart(); master(0x90); DelayMs(20); send_byte(0x44); DelayMs(20); send_byte(0x00); DelayMs(20); send_stop(); /* 0x98= device address 0x07= mode register address 1= no of bytes 0x01= data */ while(1) { master(0x91); recv_byte(1); DelayMs(500); } } void ini_uart(void) { TMOD=0X20; SCON=0X50; TH1=0XFD; TL1=0XFD; TR1=1; sda=scl=1; } void sendtopc(unsigned char *str) { while(*str) tx(*str++); } void tx(unsigned char x) { SBUF=x; while(TI==0); TI=0; } void DelayMs(unsigned int count) { // mSec Delay 11.0592 Mhz unsigned int i; while(count) { i = 115; while(i> 0) i--; count--; } }
Tue May 24 2011, 11:31 am
@ omega123
check this code
connect pcf chip pins A0,A1,A2 to ground and also give clock on OSC pin
refer for circuits on net
its read channel 0 and send it on terminal
use terminal program instead of hyper terminal
check this code
connect pcf chip pins A0,A1,A2 to ground and also give clock on OSC pin
refer for circuits on net
its read channel 0 and send it on terminal
use terminal program instead of hyper terminal
Powered by e107 Forum System