Sunday 15 July 2012


DAY 4- 10 JULY 2012
Morning Session
Assalamualaikum...
As usuall,my training day will started with update my blog first before proceed to training and learning session. But, unfortunately the internet connection here is always limited. After completed soldering process, it will continue with the test of circuit process. After complete soldering process, the PIC board will be tested by using vibration sensorand LCD to make sure it's well-function. The test is conducted using PIC C compiler software. Before the PIC board is test, coding must be done. The test is conducted to test :


i. power led

once we connect the circuit to the power supply,the power led will turn on.








ii. vibrator sensor

Ic that has been programmed must be attached on PIC board. After connect the vibrate sensor to the circuit, the vibrate sensor must be shake off to check the functionality of the circuit.








Once we shake the vibrate sensor,the led will turn on every time we shake the sensor.







iii. display  on LCD by activate relay


An IC also has been programmed with LCD coding functioning. Once we connect the circuit to LCD panel and turn on the circuit, the lcd will display a word "Hello Word" same as have been set in programming.











Afternoon Session

After complete with PIC pcb soldering task, we have be given a new task by Mr.Mazran. Our new tast is to study about GSM Modem and AT Command. We need to open Cytron website and study about that.


GSM Modem
GSM modem is specialized type of modem that operates over subscription based wireless networks which is similar to a mobile phone. A GSM modem accepts a SIM card, and basically acts like a mobile phone for the computer. Traditional modem is attached to computers for ‘dial-up’ to connect with other computer systems. A GSM modem operates in a similar fashion, except that it sends and receives data through radio waves rather than a telephone line. GSM/ GPRS modem can be connected directly to our computer's serial port for wireless GSM communications including sending and receiving text messages. 


GSM Modem


Quick Start – Interfacing GSM Modem with PC
In order to get familiar with the AT commands, we can hook up the GSM modem to the PC serial port to test the functionality of the GSM Modem. Hyper Terminal is used to send the AT command to and from the modem.

Sending SMS

1. Insert a valid SIM card from any mobile provider into the SIM slot.

2. Connect the GSM Modem to the supplied AC-DC adapter and also to the serial port of the PC.

3. Select the correct COM Port in Hyper Terminal and set up the parameters as follows.



4. Power on the GSM Modem and wait for it to initialize. While waiting, we can use the following command to make sure we can communicate with the GSM Modem.


The GSM Modem should respond with “OK”.

5. Once it’s ready, the following response will be received from the modem.



6. Now we can start sending the AT command to the GSM Modem. Start by configure the modem to use Text Mode instead of PDU mode for the SMS. This mode allows us to send SMS using AT commands without the need to encode the binary PDU field of the SMS. Use the following comman to put the modem in text mode and it should respond with “OK”.




7. After that, we can send the SMS message with the following command:-



Replace the above phone number with your own number. The modem will respond with:-


We can now type the message and send the message using the <CTRL+Z> key.




 After few seconds, the modem will respond with the message ID of the message, indicating that the message has been sent correctly.






Receiving SMS.


1. Set up the GSM Modem following step 1 – 6 in the previous section.

2. Once the GSM Modem is ready, we can use a mobile phone to send a SMS to the modem.

3. The following response received from the modem indicates a new SMS is received.


The last character indicates the memory index number, we use this index to read or delete this message. In this case, the index number is 1.

4. To list out all the available SMS in the SIM card, we can use the following command:



And the modem will respond with a list of SMS messages in the SIM card.




The responding messages are formatted like this:-

+CMGL: <index>,<status>,<from_address>,<mr>,<scts><CRLF><data>
· Index – The memory index number, use this index to read or delete this message.
· Status – The status of this message. There might be "REC READ" or "REC UNREAD" for received messages depending on whether the messages have been read or listed before.
· from_address – The subscriber number of the sender.
· mr - The reference number of this message. Most modems keep this field empty.
· Scts - The time when the message is forwarded to this phone or modem.
· data – The actual message data in plain text.

5. To read a single message, we have to use the read command. We must first know the index of the message. For instance, to read the message on memory location 1, we use



The modem will respond as follows:-


Please note that the status of the message is now "REC_READ" instead of "REC_UNREAD" because we have read the message.

6. Once we have read a message, we can free the memory by deleting the message from the storage. For instance, to delete the message on memory location 1, we use:



The modem will delete the message and return to “OK”.












No comments:

Post a Comment