CLICK HERE FOR FREE BLOGGER TEMPLATES, LINK BUTTONS AND MORE! »

Wednesday, 25 July 2012


Example coding to know the response from GSM Modem.

#include <pic.h>
#use delay (clock=20000000)
#fuses hs,nolvp,nowdt,noprotect,nobrownout
#use rs232(baud=9600, bits=8, xmit=pin_C6, rcv=pin_C7, parity=n, stream=GSM)
#byte porta=5
#byte portb=6
#byte portc=7
#include "flex_lcd.c"

volatile int  counter_search=0;            //counter to traverse the array
volatile int  counter_read=0;             //counter to fill the array
volatile Char Recieve_String[70];   //buffer for incoming data
int GET_OK(int Stop_Search);             // Just searches for an OK.
int TEST_AT();

void main()
{
       
         set_tris_a( 0x00 );     // to avoid floating pins
         set_tris_b( 0x00 );
         output_b(0X00);
         set_tris_c( 0x80 );
       
         enable_interrupts(INT_RDA);  // enable RDA interrupts
         enable_interrupts(GLOBAL);   // enable global ints
       
         delay_ms(500);
         lcd_init();
         lcd_gotoxy(3,1);
         lcd_putc("GET RESPONSE");
         delay_ms(1000);
       
         delay_ms(1000);
         TEST_AT();

}

int TEST_AT()
{
         counter_read=0;

         lcd_gotoxy(8,2);
         lcd_putc("AT");
         printf("AT\n\r");                //send command

         While(counter_read<=8)             //"A T \R \R \N O K \R \N" characters returned by modem
         {
         }

         counter_read=0;
         Delay_ms(500);

         if(GET_OK(0X0A))
         {  lcd_gotoxy(8,2);
            lcd_putc("OK");
            return(1); }
         else return(0);

}

int GET_OK(Stop_Search)
{
         counter_search=0;

         while((Recieve_String[counter_search]!='O')&&(counter_search<Stop_Search))
         {
            counter_search++;     //obvious
         }

         if((Recieve_String[counter_search]=='O')&&(Recieve_String[counter_search+1]=='K'))
         {
            counter_search=0;
            return(1);
         }
         return(0);
         counter_search=0;
}

#int_RDA
void RDA_isr()
{
   Recieve_String[counter_read]=getchar(GSM);
   counter_read++;
   if(counter_read==69)
      counter_read=0;
}

Tuesday, 24 July 2012

find info I to V converter dgn btol kn cct connection

Monday, 23 July 2012

btol kn cct in ares..tmbah voltage regulator

Friday, 20 July 2012

construct cct at ares..

Thursday, 19 July 2012

....

Wednesday, 18 July 2012

9am - 1 pm
     Continue with GSM modem.


Sending SMS
     Flow of AT command that must be use to communicate with the GSM modem (between GSM and PIC).
AT+CMGF= 1 ---> set PDU Mode = 1, Text Mode = 0
Enter : \n\r
Example coding : printf ("AT+...")
                               putc (26)
                               putc (0x14) <---- value of 14 is from ASCII Table

Sent SMS using AT Command from Hyper Terminal


2pm - 5pm
     Mr. Mazran give me another task to construct basic circuit of instrumentation amplifier 1NA114 in breadboard by follow the value that he need.



Component: Variable resistor: 10k Ohm, 50k Ohm, resistor: 2.2k Ohm (4 unit), Supply: adapter            
                      12V, 1NA114 amplifier

Circuit that have been constructed:

Tuesday, 17 July 2012

     Continue with GSM task. Try solve problem how to get GSM receive our coding and the function "CALL READY" also not interframe. Other thing that Mr. Mazran told us which try use interrupt function.


UART
UART is stand for Universal Asynchronous Receiver Transmitter. UART signal is use to send and receive data over the three wires, which is TX, RX and GND. Synchronous transmission requires the sender and receiver to share the same clock signal. While the Synchronous transmission allow the data is sent without a clock signal sent but the sending and receiver must to operate at the same timing parameter known as Baud Rate.

Monday, 16 July 2012

     Still continue with GSM task. Today I try to understand the function of GSM modem because the task required to send SMS. There have been problem with the programming. We don't understand why no output from GSM modem when send AT command. 


GSM modem
source information: rps.bmi.edu.my/fyp/submission/S111/Degree/51210109211/uploads/51210109211.pdf

Friday, 13 July 2012

     Today I learned how to built RS232 data interface cable by using wire communication of black (pin 5), yellow (pin 2) and white (pin 3). Only connection for pin 2, 3 and 5 do for this task, the connection refer in figure below:  


Sub-D 9 pin

                    Sub-D 9  pin diagram                                            Sub-D 9 pin table

    This cable will connect to PIC board where 5V logic level receive and transmit signals of the PIC are connected to RS232 levels by a MAX232 device. Baud rates are generates by dividing down the system clock. The USART ( Universal Synchronous Asynchronous Receiver Transmitter) receive and transmit pins are C7 and C6 respectively.

Concept of receive and transmit

Tools required: wire communication (black, white, yellow), solder iron, solder lead, wire crimper, wire stripper, sub-D 9 pin male, pin header connector, shrink tube.

 
Wire stripper                                     Wire crimper

RS232 data interface cable

After that, do some research and any information about programming for new task which to set the PIC to send SMS in each 10 minutes. In 10 minute concept already but to set the programming for GSM modem still have problem.

Wednesday, 11 July 2012

     Continue our with sonar sensor task, there still some problem with the program code. Make some correction by create function declaration of beeping and beepoff for buzzer sound. As beeping and beepoff on the coding that has high and low pin C1 for buzzer. 


     Mr Mazran help us by give some hint:
#define DEL500 500 // declare of DEL500 as delay 500


void beeping (int dly) // function declaration of buzzer
{
output_high (pin_c1); // int dly : replace dly by the value at above coding
delay_ms (dly);
output_low (pin_c1);
delay_ms (dly);
}


     By afternoon, we complete our second task for understanding sonar sensor and output buzzer with 5 level. 
Connection circuit board

LCD display


     After done, Mr Mazran give another task by adding timer on the coding. The timer require need to be set at the PIC to send SMS in each 10 minute. We need to study and understand the flow by refer to CCS website and another forum. 

Tuesday, 10 July 2012

10am - 5pm
     Continue our second task of sonar sensor using PIC16F876A. Today we still try to create and discuss our programming and test in the ISIS simulation and also hardware. There have a problem to identify their range to display and also their beeping. At the same time, continue for my first task of soldering PCB board.


Step for Second Task


1.  Write C program by using PIC C Compiler software to create file.hex
2.  Simulate by using ISIS Proteus software:


3.  Write program into PIC by using PICkit 2 Programmer:
     Step 1: Open PICkit 2 Programmer
     Step 2: Check connection between PIC board and RS232 cable. Click Tools > Check Communication



     Step 3: Click File > Import File. Select file.hex program that have been create.
     Step 4: Click Write - to write the file.hex program


4.  Test hardware.
5.  Troubleshoot if have any error, then follow the involved step above. 

Monday, 9 July 2012


10am - 5pm

     Starting with our second task to create a PIC program code for the application of sonar sensor using PIC16F876A. Firstly, we discuss and understand the concept of our task which the sonar sensor as analog input device and buzzer as output device. The task require programming which the sonar sensor will sense the distance between sensor and any obstacle, at the same time the output buzzer will beep as warning sign. If the distance between sensor and obstacle is closer, the beep sound will be more quickly or the frequency of sound will increasing. As the LCD will display the range of the distance. This application same as reverse car concept.

Sonar sensor as input device

Buzzer as output device

PIC16F876A PCB board

     After compile program code into hex file, the programming is check after create simulation circuit in the ISIS Proteus software. For today, we try to understand how sonar sensor can sense the distance between sensor and obstacle by adjusted variable resistor. Then in the program code, the distance is divided into 5 level. 

Simulation using ISIS Proteus software

Friday - 6 July 2012


     Mr. Mazran and Engr. Siva briefing about rule and time attendance to follow during this industrial training:


Time:    9am   - 10am (Report blog)
            10am - 12.30pm (Daily chores)
            1pm   - 2pm (Break)
            5pm (Dismissed) 


Schedule:

General Task:
1. PCB / Soldering
2. PLC
3. IP Camera
4. Mechanical Prototype
5. Visual Basic (VB) : Week 5

Specific Task: Website Team

Thursday, 5 July 2012


     First of all i would like to introduce myself, my name is Nur Sakinah bt Abdul Razak. I'm practical student from UTeM. This blog is created to publish my daily report blog as practical student at HIIS.

Hitech Integrated Innovation Solutions Sdn. Bhd. 


HIIS is Hitech Integrated Innovation Solutions Sdn. Bhd. or known as UTeM Holdings. HIIS was constituted in January 2012 which organized by Mr. Mazran b. Esro, Engr. Siva Kumar Subramaniam and Prof Razi. HIIS currently come out with water level controller project. Since today, the projects had been installed at Wisma Persekutuan MITC, Ayer Keroh.

              
Mazran b. Esro                                 Engr. Siva Kumar 
                                                           Subramaniam      

     Today is my first day as practical student at HIIS. I and other team member is stationed at tutorial room in building FKEKK at main campus UTeM. The tutorial room use to complete the our industrial training activity such as report blog and daily chores (soldering, task, etc.). At first day, we prepared and clean tutorial room.

Location LI