CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

could anyone convert mikroc esp8266 library to ccs c, please

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
sareehy



Joined: 03 May 2016
Posts: 20

View user's profile Send private message

could anyone convert mikroc esp8266 library to ccs c, please
PostPosted: Mon Jun 27, 2016 12:12 pm     Reply with quote

I have an esp8266 library for mikroc pro i got it from mikroe forums.

could anyone help me to convert it to work with ccs c , please ?

esp8266 library
Code:

extern sfr  sbit RST_ESP8266 ;
extern sfr  sbit RST_ESP8266_dir;
// Set of basic AT commands
const char   AT[]        = "AT"; // startupTest AT startup
const char ATE0[]        = "ATE0";//Disable echo
const char AT_RST[]      = "AT+RST";//Restart module
const char AT_CWMODE[]   = "AT+CWMODE=3";//WIFI mode (station/softAP/station+softAP) now choice station+softAP
const char AT_CIPMUX[]   = "AT+CIPMUX=1";//Set multiple connections mode
const char AT_CIFSR[]    = "AT+CIFSR";//Get local IP address
const char AT_CWJAP[]    = "AT+CWJAP=";// Connect to AP.
const char AT_CWSAP[]    = "AT+CWSAP=";//Set parameters under AP mode
const char AT_CIPSEND[]  = "AT+CIPSEND=";//Send data
const char AT_CIPSERVER[]="AT+CIPSERVER=1,80";//create server and using port 80.
const char AT_CIPCLOSE[] ="AT+CIPCLOSE=";//disconnection .
extern char ESP_ID ;
extern unsigned char *SSID_STA ;
extern unsigned char *password_STA ;
extern unsigned char *port ;
extern unsigned char *SSID_AP;
extern unsigned char *password_AP ;
extern const char chanel ;
extern const char enc ;
extern unsigned char *IP_address;
extern const char esp8266_rec_max;
extern unsigned char esp8266_received_data[];
//
// Responses to parse
const char ESP_OK                       = 1;
const char ESP_Ready_To_Receive_Message = 2;
const char ESP_ERROR                    = 3;
const char ESP_READY                    = 4;
const char ESP_FAIL                     = 5;
const char ESP_SEND_OK                  = 6;



// State machine control variables
char esp_state = 0;
char esp_response_rcvd = 0;
short esp_responseID = -1, esp_response = -1, esp_rsp;
unsigned char  esp_i , esp_DataReady_received=0 , esp8266_len=0,esp8266_id=0  ;


//*********************/
void new_line()
{
 UART_Wr_Ptr(0x0D);
 UART_Wr_Ptr(0x0A);
}
 //***********************//
 void wait_3sec()
 {
  delay_ms(3000);
 }
 
 //********************
  //
 void wait_1sec()
 {
  delay_ms(1000);
 }
 //****************
// Send command or data to the esp8266  Module - (const)
void esp8266_Send(const char *s)
{
// Send command or data string
   while(*s) {
    UART_Wr_Ptr(*s++);
   }
// Terminatation by CR+LF

}

// Send command or data to the esp8266  Module - (RAM)
void esp8266_Send_Ram(char *s1)   //
{
// Send command or data string
   while(*s1) {
    UART_Wr_Ptr(*s1++);
   }
// Terminatation by CR
   //UART_Wr_Ptr(0x0D);
   //UART_Wr_Ptr(0x0D);
}

// Get esp8266  response, if there is any
short Get_response()
{
    if (esp_response_rcvd)
      {
      esp_response_rcvd = 0;
      return esp_responseID;
     }
    else  return -1;
}

// Wait for esp8266 response (infinite loop)
void Wait_response(char rspns)
{
 char test = 1;

  while (test)
    {
     test = Get_response();
     if ((test == rspns) || (test == ESP_ERROR))
     test = 0;
     else
     test = 1;

    }
}


//*****************************************************************//
// Send Status data
void Send_ESP8266_data(const char *ESP8266_Msg_const ,char *ESP8266_Msg_ram,unsigned int len_esp_data  )
{
  esp8266_Send(AT_CIPSEND); // send commands "AT+CIPSEND="
  UART_Wr_Ptr(ESP_ID+48);// send ID.
  UART_Wr_Ptr(',');

   // send lenght data
  if(len_esp_data <=9)UART_Wr_Ptr(len_esp_data+48);
  else if(len_esp_data >= 10 && len_esp_data <=99 )
       {
        UART_Wr_Ptr(len_esp_data/10 +48);
        UART_Wr_Ptr(len_esp_data%10 +48);
       }
  else if(len_esp_data >=100 && len_esp_data <=999 )
       {
        UART_Wr_Ptr(len_esp_data/100 +48);
        UART_Wr_Ptr(len_esp_data/10%10 +48);
        UART_Wr_Ptr(len_esp_data%10 +48);
       }
  else if(len_esp_data >=1000 && len_esp_data <=9999 )
       {
        UART_Wr_Ptr(len_esp_data/1000 +48);
        UART_Wr_Ptr((len_esp_data/100)%10 +48);
        UART_Wr_Ptr((len_esp_data/10)%10 +48);
        UART_Wr_Ptr(len_esp_data%10 +48);
       }

  new_line(); //CR+LF .

  Wait_response(ESP_OK); // Wait for appropriate ready signal
  Delay_ms(20);
  esp8266_Send(ESP8266_Msg_const);               // Send data content
  esp8266_Send_Ram(ESP8266_Msg_ram);               // Send data content

  new_line(); //CR+LF .
  Wait_response(ESP_OK);             // Wait SEND OK as confirmation that the message was sent
    wait_1sec();
    esp8266_Send(AT_CIPCLOSE); // Send "AT+CIPCLOSE="
    UART_Wr_Ptr(ESP_ID+48);// send ID.
    new_line();




}
//**************************************************************//
void configuration_ESP8266()
{
 RST_ESP8266=0;
 RST_ESP8266_dir=0;
 wait_1sec();
 RST_ESP8266=1;
// Negotiate baud rate
  while(1)
  {
    esp8266_Send(AT);                 // Send "AT" string until ESP8266 sets up its baud rade
    new_line();
    wait_1sec();                    // and gets it correctly
    if (Get_response() == ESP_OK) break;    // If esp8266 says "OK" on our baud rate we program can continue
  }
 //****************************************************//
 esp8266_Send(ATE0);        // Disable command echo
 new_line();
 Wait_response(ESP_OK);
 //****************************************************//
  while(1)
  {
    esp8266_Send(AT_RST);                 // Send "RST" reset module
    new_line();
    wait_1sec();                   // and gets it correctly
    if (Get_response() == ESP_READY) break;    // If esp8266 says "ready" on our baud rate we program can continue
  }
 //****************************************************//
  do
  {
    esp8266_Send(AT_CWMODE);                // set wifi mode 1-station  2- access point 3- station+access point
    new_line();
    wait_1sec();                    // and gets it correctly

  }while(Get_response() != ESP_OK);// If esp8266  says "OK" on our baud rate we program can continue
//****************************************************//
    while(1)
  {
    esp8266_Send(AT_CIPMUX);                 // Set multiple connections mode
    new_line();
    wait_1sec();                    // and gets it correctly
    if (Get_response() == ESP_OK) break;    // If esp8266 says "OK" on our baud rate we program can continue
  }
 //****************************************************//

   do {      // connected with your network
     //AT+CWJAP="SSID","pasword" <CR><LF>
     esp8266_Send(AT_CWJAP);
     UART_Wr_Ptr('"');
     esp8266_Send_Ram(SSID_STA);
     UART_Wr_Ptr('"');
     UART_Wr_Ptr(',');
     UART_Wr_Ptr('"');
     esp8266_Send_Ram(password_STA);
     UART_Wr_Ptr('"');
     new_line();
     wait_3sec();
  } while(Get_Response() != ESP_OK);
 //****************************************************//
  do { // set parameter for access point
     //AT+CWSAP="SSID","pasword" , port,port,mode, <CR><LF>
     esp8266_Send(AT_CWSAP);
     UART_Wr_Ptr('"');
     esp8266_Send_Ram(SSID_AP);
     UART_Wr_Ptr('"');
     UART_Wr_Ptr(',');
     UART_Wr_Ptr('"');
     esp8266_Send_Ram(password_AP);
     UART_Wr_Ptr('"');
     UART_Wr_Ptr(',');
     UART_Wr_Ptr(chanel+48);
     UART_Wr_Ptr(',');
     UART_Wr_Ptr(enc+48);
     new_line();
     wait_3sec();
  } while(Get_Response() != ESP_OK);
 
 //****************************************************//

  do {
     //connected with ip addrss and used UDP protocol
     esp8266_Send(AT_CIPSERVER);
     new_line();
     wait_3sec();
  } while(Get_Response() != ESP_OK);
 //****************************************************//
}

// state machine
// Reading the data from UART in the interuppt routine
void esp8266_read_message()
{
    char esp_tmp;

    esp_tmp = UART_Rd_Ptr();                        // Get received byte

    // Process reception through state machine
// words "OK" ,"ready","REEOR","FAIL","+IPD" ,"CLOSED"
    switch (esp_state)
    {
      case 0: {
                esp_response = -1;                   // Clear response
                if (esp_tmp == 'O') //  // We have 'O', it could be "OK"
                  esp_state = 1;   // Expecting 'K'

                else if (esp_tmp == 'E') // // We have 'E', it could be "ERROR"
                  esp_state = 10;   // Expecting 'R'

                else if (esp_tmp == 'r') // // We have 'r', it could be "ready"
                  esp_state = 20;  // Expecting 'e'

                else if(esp_tmp == 'F') //// We have 'F', it could be "FAIL"
                  esp_state = 30;  // Expecting 'A'


               else if (esp_tmp == '+') // // We have '+', it could be "+IPD"
                  esp_state = 100;  // Expecting 'I'
                break;
              }

      case 1: {
                if (esp_tmp == 'K') // We have 'K', it could be "OK"
                {
                  esp_response = ESP_OK;// We have "OK" response
                  esp_state = 2;// Expecting CR+LF
                }
                else
                  esp_state = 0;  // reset operation
                break;
              }

      case 10: {
                if (esp_tmp == 'R') // We have 'R', it could be "ERROR"
                  esp_state = 11;
                else
                  esp_state = 0;
                break;
               }

      case 11: {
                if (esp_tmp == 'R') // We have 'R', it could be "ERROR"
                  esp_state = 12;
                else
                  esp_state = 0;
                break;
              }

      case 12: {
                if (esp_tmp == 'O') // We have 'O', it could be "ERROR"
                  esp_state = 13;
                else
                  esp_state = 0;
                break;
              }

      case 13: {
                if (esp_tmp == 'R') // We have 'R', it could be "ERROR"
                {
                  esp_response = ESP_ERROR;             // ERROR
                  esp_state = 2;
                }
                else
                  esp_state = 0;
                break;
               }

      case 20: {
                if (esp_tmp == 'e') // We have 'e', it could be "ready"
                  esp_state = 21;
                else
                  esp_state = 0;
                break;
              }

      case 21: {
                if (esp_tmp == 'a')// We have 'a', it could be "ready"
                  esp_state = 22;
                else
                  esp_state = 0;
                break;
               }

      case 22: {
                if (esp_tmp == 'd')// We have 'd', it could be "ready"
                  esp_state = 23;
                else
                  esp_state = 0;
                break;
               }


      case 23: {
                if (esp_tmp == 'y') // We have 'y', it could be "ready"
                  {
                  esp_response = ESP_READY;              // READY
                  esp_state = 2;
                 }
                else
                  esp_state = 0;
                break;
               }



      case 30: {
                if (esp_tmp == 'A') // // We have 'A', it could be "FAIL"
                  esp_state = 31;
                else
                  esp_state = 0;
                break;
               }

      case 31: {
                if (esp_tmp == 'I')
                  esp_state = 32;
                else
                  esp_state = 0;
                break;
              }

      case 32: {
                if (esp_tmp == 'L') // We have 'L', it could be "FAIL"
                {
                  esp_response = ESP_FAIL;              // FAIL
                  esp_state = 2;
                }
                else
                  esp_state = 0;
                break;
              }

      case 100 : {   // We have 'I', it could be "+IPD"

                  if(esp_tmp == 'I')esp_state = 101;

                  else esp_state = 0;
                  break;
                }

      case 101 : {  // We have 'P', it could be "+IPD"
                  if(esp_tmp == 'P')esp_state = 102;

                  else esp_state = 0;
                  break;
                }
      case 102 : {  // We have 'D', it could be "+IPD"
                  if(esp_tmp == 'D')esp_state = 103;

                  else esp_state = 0;
                  break;
                }
      case 103 : {  // wait to read id the first
                  if(esp_tmp == ',' )
                   {
                    esp_state=104;
                   }

                  else esp_state=0;
                  break;
                }
      case 104 : {  // read id .
                   if(esp_tmp>='0' && esp_tmp<='5')
                    {
                     esp8266_id=esp_tmp-'0';
                     esp_state=105;
                    }
                  else esp_state=0;
                  break;
                }

       case 105 : {
                  if(esp_tmp !=':' )
                   {
                    esp_state=105;

                   }

                  else
                    {

                     esp_i=0;
                     esp8266_received_data[0]=0; // reset esp8266_received_data for store new data
                     esp_DataReady_received=0;  // reset flag for compelete received data
                     esp_state=106;

                    }
                  break;
                }

      case 106 : {

                  if(esp_tmp !='H'  ) // wait until read 'H' from word "HTTP"
                   {

                    esp_i++;
                    if(esp_i>esp8266_rec_max)
                       {
                        esp_i=esp8266_rec_max;
                       }
                    else  esp8266_received_data[esp_i-1] = esp_tmp;
                   }

                  else
                      {  // compelete received data
                       esp_DataReady_received=1;
                       esp8266_received_data[esp_i ]=0;// reset pointer for esp8266_received_data this very importment
                       esp_state=0;
                      }
                   break;
                 }
      case 2: {


                if (esp_tmp == 13)esp_state = 3;

                else  esp_state = 0;

                break;
              }

      case 3: {
                if (esp_tmp == 10)
                {
                  esp_response_rcvd = 1;
                  esp_responseID = esp_response;
                 esp_state = 0;
                }
               else esp_state = 0;

                break;
             }

      default: {
                esp_state = 0;
                break;
              }
    }
 }


/******************************************************************************/








example on using esp8266 as server using the library



Code:




#include "Library_ESP8266_2.h"

sbit led_connected at LATE0_bit;
sbit led_connected_dir at TRISE0_bit;
// Lcd module connections
sbit LCD_RS_Direction at TRISB4_bit;
sbit LCD_EN_Direction at TRISB5_bit;
sbit LCD_D4_Direction at TRISB0_bit;
sbit LCD_D5_Direction at TRISB1_bit;
sbit LCD_D6_Direction at TRISB2_bit;
sbit LCD_D7_Direction at TRISB3_bit;

sbit LCD_RS at LATB4_bit;
sbit LCD_EN at LATB5_bit;
sbit LCD_D4 at LATB0_bit;
sbit LCD_D5 at LATB1_bit;
sbit LCD_D6 at LATB2_bit;
sbit LCD_D7 at LATB3_bit;
// End Lcd module connections


//************** ESP8266 parameter*********//
sbit RST_ESP8266 at LATC0_bit;
sbit RST_ESP8266_dir at TRISC0_bit;
// Change following information to match your network settings
unsigned char *SSID_STA = "your name network";
unsigned char *password_STA = "your password network";
unsigned char *port = "1234";
unsigned char *SSID_AP = "ESP8266";
unsigned char *password_AP = "ESP12345";
unsigned char *IP_address="192.168.1.11";// choice IP acording IP for your router
                                       // if you change this ip please change ip in array indexPage1[] mean this "url=http://192.168.1.11\">\ "
const char chanel = 6;
const char enc = 4;
char ESP_id =0;
const char esp8266_rec_max=16;// this array store GET /?+data then 6 for GET /? and 10 for max.data //
unsigned char esp8266_received_data[esp8266_rec_max+1];
//****************************************************//

// default html page
//
const char    indexPage1[] =
"HTTP/1.1 200 OK\nContent-type: text/html\n\n <meta http-equiv=\"refresh\" content=\"10;url=http://192.168.1.11\">\
<html>\
<head>\
<title>Sheimy Micro Systems</title>\
</head>\
<body bgcolor=\"#CCFF00\">\
<h2 align=\"center\"><font size=\"6\" color=\"#0066FF\">Sheimy Micro Systems Min-Webserver Using PIC18F45k22</font></h2>\
<form action=\"\" method=\"get\" name=\"sheimy\"> \
<table width=\"200\" border=\"2\" align=\"center\" cellpadding=\"2\" cellspacing=\"3\">\
<tr >\
<td colspan=3 bgcolor=#000000><marquee behavior=alternate direction=left scrollamount=5><font color=#00FF33>Sheimy Home Automation Controller Based Ethernet</font></marquee></td>\
</tr>\
<tr>\
<td width=\"200\">Device 1</td>\
";

char indexPage2[]=
"<td bgcolor=#CCFF00><center><input name=\"dev1\" width=\"200\" type=\"submit\" value=\"d1on\"/></center></td>\
<td bgcolor=#FF0000><center><input name=\"dev1\" width=\"200\" type=\"submit\" value=\"d1off\"/></center></td>\
</tr> \<tr> \<td width=\"200\">Device 2</td>\<td bgcolor=#CCFF00><center><input name=\"dev2\" width=\"200\" type=\"submit\" value=\"d2on\"/></center></td>\
<td bgcolor=#FF0000><center><input name=\"dev2\" width=\"200\" type=\"submit\" value=\"d2off\"/></center></td>\</tr>\
<tr><td width=\"200\">Volt </td><td colspan=2>    mV</td></tr>\
</table>\
</form> \
<h2 align=\"center\"><a href=\"http://sheimymicro.freehostia.com/\" rel="nofollow" target=\"_new\"><font size=\"6\" color=\"#0066FF\">Sheimy Micro Systems Website</font></a></h2> \
<h2 align=\"center\"><font color=#FF9900>By Eng Ahmed Sheimy</font></h2>\
</body> \
</html>";
  //768

// network parameters
long t;
char x,y;
char volt[6];


void ESP8266_UserTCP()

 {
     //GET /?dev2=d2off
   if(!memcmp(esp8266_received_data+11, "d1on", 4))        // do we have ON command
    PORTD.F0 = 1;                // set PORTD bit0
   else
    if(!memcmp(esp8266_received_data+11, "d1off", 5))        // do we have OFF command
      PORTD.F0 = 0;        // clear PORTD bit0
  if(!memcmp(esp8266_received_data+11, "d2on", 4))        // do we have ON command
    PORTD.F1 = 1;                // set PORTD bit0
  else
    if(!memcmp(esp8266_received_data+11, "d2off", 5))        // do we have OFF command
      PORTD.F1 = 0;        // clear PORTD bit0
    memcpy(indexPage2+495,volt, 4);
if (PORTD.F0)
    {
     memcpy(indexPage2+13, "#00FF00", 6);        // highlight (red) ON
     memcpy(indexPage2+114, "#FF0000", 6);        // clear OFF
    }
  else
    {
     memcpy(indexPage2+13, "#FF0000", 6);        // clear ON
     memcpy(indexPage2+114, "#00FF00", 6);        // highlight (yellow) OFF
    }
if (PORTD.F1)
    {
     memcpy(indexPage2+256, "#00FF00", 6);        // highlight (yellow) ON
     memcpy(indexPage2+357, "#FF0000", 6);        // clear OFF
    }
  else
    {
     memcpy(indexPage2+256, "#FF0000", 6);        // clear ON
     memcpy(indexPage2+357, "#00FF00", 6);        //
    }

  Send_ESP8266_data(indexPage1,indexPage2,1309); // 1309 = length for indexPage1 + lenght for indexPage2

}
//=====================================================================================

//==================================main entry===========================================
void main()
{
  ANSELA=0;
  ANSELB=0;
  ANSELC=0;
  ANSELD=0;
  ANSELE=0;
  SLRCON=0;
  ANSELA=1; // AN0
  trisd.f0=0; trisd.f1=0;
  portd.f0=0;portd.f1=0;
  TRISA0_bit=1;
  Lcd_Init();
  lcd_cmd(1);
  lcd_cmd(_LCD_CURSOR_OFF);
  lcd_out(1,1,"Wait Please..");

  led_connected=0;
  led_connected_dir=0;

    UART1_Init(115200);
  Delay_ms(300);
 // Setup interrupts
  RC1IE_bit = 1;          // Enable Rx1 intterupts
  PEIE_bit = 1;           // Enable peripheral interrupts
  GIE_bit  = 1;           // Enable global interrupts
//
  configuration_esp8266();
  led_connected=1;
  lcd_out(1,1,"   CONNECTED   ");
  delay_ms(1000);
  lcd_cmd(1);;


  while(1)
  {                                 // endless loop
    if(esp_DataReady_received)
       {
        esp_DataReady_received=0;
        lcd_out(1,1,"ID=");
        lcd_chr(1,4,esp8266_id+48);
        lcd_out(2,1,"DATA:");
        for (y=0;y<esp_i-6;y++)lcd_chr(2,y+6,esp8266_received_data[y+6]);

         ESP8266_UserTCP();
        }

    t=ADC_Read(0);
    t=t*3300/1024;
    volt[0]=t/1000+48;
    volt[1]=t/100%10 +48;
    volt[2]=t/10%10 +48;
    volt[3]=t%10 +48;
    volt[4]=0;
    lcd_out(1,6,"VOLT=");
    lcd_out(1,11,volt);
    delay_ms(250);
  }
}


// state machine
// Reading the data from UART in the interuppt routine
void interrupt()
{
 if (RCIF_bit == 1)
   {                           // Do we have uart rx interrupt request?
    esp8266_read_message();
   }

 }

//====================================End OF Program======================================
//==================================All Thanks To Allah===================================






Thanks in advance Smile
asmboy



Joined: 20 Nov 2007
Posts: 2128
Location: albany ny

View user's profile Send private message AIM Address

PostPosted: Mon Jun 27, 2016 2:02 pm     Reply with quote

here is a hint
- all the silly pointer based UART_ fragmented code can be replaced with
CCS printf() statements that print explicit data.


Have you read the CCS manual and tried to do anything for your self?
---
Experienced posters here expect that you did SOMETHING to try to help your own cause before throwing yourself on the tender mercy of the forum
to do it all for you.
temtronic



Joined: 01 Jul 2010
Posts: 9241
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Mon Jun 27, 2016 2:26 pm     Reply with quote

gee I was thinking of getting some of them but have yet to see a 'distance' spec...
I'd like something good for 100' ( 30m)....

Jay
Ttelmah



Joined: 11 Mar 2010
Posts: 19535

View user's profile Send private message

PostPosted: Mon Jun 27, 2016 2:35 pm     Reply with quote

<https://www.youtube.com/watch?v=KYLN9qH0C84>
<http://hackaday.com/2014/09/26/esp8266-distance-testing/>

Certainly well over 100metres in clear air.
temtronic



Joined: 01 Jul 2010
Posts: 9241
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Mon Jun 27, 2016 4:04 pm     Reply with quote

Thanks Mr. T.

I find it odd that sellers never post even 'clear air' distance.....
guess I'll have to buy a few and see !

Jay
sareehy



Joined: 03 May 2016
Posts: 20

View user's profile Send private message

PostPosted: Mon Jun 27, 2016 7:53 pm     Reply with quote

asmboy wrote:
here is a hint
- all the silly pointer based UART_ fragmented code can be replaced with
CCS printf() statements that print explicit data.


Have you read the CCS manual and tried to do anything for your self?
---
Experienced posters here expect that you did SOMETHING to try to help your own cause before throwing yourself on the tender mercy of the forum
to do it all for you.


Thanks for reply Smile
Could you tell me how can i convert these statements ?
Code:
extern sfr  sbit RST_ESP8266 ;
extern sfr  sbit RST_ESP8266_dir;

Regards
dyeatman



Joined: 06 Sep 2003
Posts: 1934
Location: Norman, OK

View user's profile Send private message

PostPosted: Mon Jun 27, 2016 8:41 pm     Reply with quote

Did you find the driver already written in CCS C?
https://github.com/Picproje/ESP8266-Wifi-Modul-ornek-Uygulama/tree/master/CCS%20C

There are also a bunch of usage examples!
_________________
Google and Forum Search are some of your best tools!!!!
Gabriel



Joined: 03 Aug 2009
Posts: 1067
Location: Panama

View user's profile Send private message

PostPosted: Mon Jun 27, 2016 9:49 pm     Reply with quote

I have a library for it i made.
Planning on posting soon, "thingspeak ready".

G.
_________________
CCS PCM 5.078 & CCS PCH 5.093
ezflyr



Joined: 25 Oct 2010
Posts: 1019
Location: Tewksbury, MA

View user's profile Send private message

PostPosted: Thu Jun 30, 2016 10:30 am     Reply with quote

dyeatman wrote:
Did you find the driver already written in CCS C?
https://github.com/Picproje/ESP8266-Wifi-Modul-ornek-Uygulama/tree/master/CCS%20C


Proceed with a bit of caution using the referenced code! Here is the first thing I found:

Code:

#int_RDA
void  RDA_isr(void)
{
   gets(ESP8266Buf);
}


Kinda stopped looking after that..... Shocked
_________________
John

If it's worth doing, it's worth doing in real hardware!
mutthunaveen



Joined: 08 Apr 2009
Posts: 100
Location: Chennai, India

View user's profile Send private message

PostPosted: Wed Nov 16, 2016 1:43 am     Reply with quote

Hello Gabriel

Gabriel wrote:
I have a library for it i made.
Planning on posting soon, "thingspeak ready".

G.


Have you developed your code? Can i have it? Can you please post your work so i can make use?

Thank you
leaveme



Joined: 24 Nov 2010
Posts: 19

View user's profile Send private message

PostPosted: Thu Feb 20, 2020 11:32 am     Reply with quote

Gabriel wrote:
I have a library for it i made.
Planning on posting soon, "thingspeak ready".

G.

Though it is a very old thread, but did you manage to make the library for esp8266?

regards
colesha



Joined: 09 Jan 2012
Posts: 45

View user's profile Send private message Send e-mail

PostPosted: Wed Mar 24, 2021 1:19 pm     Reply with quote

leaveme wrote:
Gabriel wrote:
I have a library for it i made.
Planning on posting soon, "thingspeak ready".

G.

Though it is a very old thread, but did you manage to make the library for esp8266?

regards


Man, I too really need this driver, but I can not find it anywhere, CCS version. We need to know or a recommendation for which wifi module can be used with ccs
temtronic



Joined: 01 Jul 2010
Posts: 9241
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Wed Mar 24, 2021 2:13 pm     Reply with quote

You could take the driver posted at the top of this thread 5 YEARS ago..and in less than 5 hours ,convert it into CCS C code.

it's really not that hard or complicated....
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group