Jump to content

assad

Members
  • Content Count

    5
  • Joined

  • Last visited

  1. i am getting error while compiling bmp180 example program Description Resource Path Location Type #20 identifier "I2C3_BASE" is undefined main.c /ali line 273 C/C++ Problem pleas help me
  2. i got error while using bmp180 exmple code kindly help me Description Resource Path Location Type #20 identifier "I2C3_BASE" is undefined main.c /ali line 271 C/C++ Problem
  3. assad

    I2C with Stellaris LM4F120H5QR - working driver API example code

    i want to interface lm75b temp sensor. i did not receiving the correct value is there any problem in coding datasheet is given here http://www.ti.com/lit/ds/symlink/lm75b.pdf kindly help me that what changes i have to made #define SYSTICKHZ 1000 #define SYSTICKMS (1000 / SYSTICKHZ) #define LM75B_ADDR 0x90 // LM75B registers #define LM75B_Conf 0x01 #define LM75B_Temp 0x00 #define LM75B_Tos 0x03 #define LM75B_Thyst 0x02 #include "inc/hw_types.h" #include "inc/hw_memmap.h" #include "inc/hw_ssi.h" #include "inc/hw_ints.h" #include "driverlib/i2c.h" #include "driverlib/sysctl.h" #include "driverlib/rom.h" #include "driverlib/rom_map.h" #include "driverlib/pin_map.h" #include "driverlib/gpio.h" #include "driverlib/systick.h" #include "driverlib/interrupt.h" #include "driverlib/ssi.h" #include "utils/ustdlib.h" #include "I2C_Stellaris_API.h" #ifdef DEBUG void __error__(char *pcFilename, unsigned long ulLine) { } #endif void main(void) { int a = 0; int b = 0; float c; int d=3; char cmd[2]={0x01,0x00}; char temp_Values[2]={2,2}; SysCtlClockSet(SYSCTL_SYSDIV_4|SYSCTL_USE_PLL|SYSCTL_XTAL_16MHZ|SYSCTL_OSC_MAIN); ROM_IntMasterEnable(); I2CSetup(I2C1_MASTER_BASE, 0); // d=I2CRegRead(I2C0_MASTER_BASE, LM75B_ADDR,0x02); d=I2CRegWrite(I2C1_MASTER_BASE,LM75B_ADDR,0x00,LM75B_Conf);// here returned value is 0, i dont know where is error while(1) { // replace with timer for 4.5ms delay SysCtlDelay((ROM_SysCtlClockGet() / SYSTICKHZ) * 5); I2CReadData(I2C1_MASTER_BASE,LM75B_ADDR,LM75B_Temp,temp_Values,2); SysCtlDelay((ROM_SysCtlClockGet() / SYSTICKHZ) * 5); a=(int)temp_Values[0]; b=(int)temp_Values[1]; c=(a|b)/256; SysCtlDelay((ROM_SysCtlClockGet() / SYSTICKHZ) * 5); asm(" NOP"); } } void SysTickIntHandler(void) { }
  4. assad

    Using Stellaris Launchpad as a Thermometer

    #20 identifier "GPIO_PA0_U0RX" is undefined main.c /I2C line 120 C/C++ Problem #20 identifier "GPIO_PA1_U0TX" is undefined main.c /I2C line 121 C/C++ Problem i m getting this error in ccs compiler pleas help
×