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

How can I display a sms on LCD?
Goto page Previous  1, 2, 3  Next
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Gabriel



Joined: 03 Aug 2009
Posts: 1067
Location: Panama

View user's profile Send private message

PostPosted: Tue May 07, 2013 7:37 am     Reply with quote

OK so you do have real hardware...

you have my attention....

Let's get this to work.

i see in you picture, your serial conection to the modem is not there...

id call that a hardware problem! Very Happy
_________________
CCS PCM 5.078 & CCS PCH 5.093
Gabriel



Joined: 03 Aug 2009
Posts: 1067
Location: Panama

View user's profile Send private message

PostPosted: Tue May 07, 2013 7:42 am     Reply with quote

i see you dont have a MAX232 chip on you board either...

which... is... required... for... your... COM....




..... [Picard FacePalm]
_________________
CCS PCM 5.078 & CCS PCH 5.093
Praful



Joined: 18 Jun 2012
Posts: 23

View user's profile Send private message

PostPosted: Tue May 07, 2013 7:45 am     Reply with quote

Max232 is under side of the Gsm module it is Ready made module so it has smd components downside there.....
Gabriel



Joined: 03 Aug 2009
Posts: 1067
Location: Panama

View user's profile Send private message

PostPosted: Tue May 07, 2013 7:52 am     Reply with quote

Yes, I know your board is a ready made module.
Yes, I know it has an RS232 Driver chip on board.
Yes, I see the DB9 Port conected to nothing
Yes, I see the power Barrel Jack of the modem conected to nothing
Yes, I see your 16F877A with pins C6 and C7 conected to noting as well
Yes, I see your PIC board does not have a MAX232 Chip.
Yes, I see 3 cables going from the power side of your PIC board to the modem...I assume Power Conection

Yes, you have invented a new kind of wireless serial COM.
OR
Yes, you have invented a new kind of wireless power transfer.

G.
_________________
CCS PCM 5.078 & CCS PCH 5.093
Gabriel



Joined: 03 Aug 2009
Posts: 1067
Location: Panama

View user's profile Send private message

PostPosted: Tue May 07, 2013 7:58 am     Reply with quote

come on man, you have the hardware, you have the code.

this is Clearly a hardware problem.
do not try to add or modify functionality to the code until you get the hardware right.

G.
_________________
CCS PCM 5.078 & CCS PCH 5.093
Praful



Joined: 18 Jun 2012
Posts: 23

View user's profile Send private message

PostPosted: Tue May 07, 2013 8:00 am     Reply with quote

I just removed com port and power adapter to take a photo at more light area also no need of max232 between module and uC it is only required to communicate with PC only. I can send sms and make a calls with the help of hyper terminal with this circuit just few hours before the *.ht file is the output of terminal which is not able to copy or show u otherwise you've no need to ask such arguments or questions ok I'll show u a print screen img soon....
Praful



Joined: 18 Jun 2012
Posts: 23

View user's profile Send private message

PostPosted: Tue May 07, 2013 8:05 am     Reply with quote

http://imageshack.us/photo/my-images/32/screenwup.png/
Praful



Joined: 18 Jun 2012
Posts: 23

View user's profile Send private message

PostPosted: Tue May 07, 2013 8:07 am     Reply with quote

Link for screen shot when i communicate with gsm modem
http://imageshack.us/photo/my-images/32/screenwup.png/

Smile
Gabriel



Joined: 03 Aug 2009
Posts: 1067
Location: Panama

View user's profile Send private message

PostPosted: Tue May 07, 2013 8:09 am     Reply with quote

OK...

All you need to change for my code to work in your setup is this:
Code:
#include <16f886.h>
#device adc=8
#device *=16
#fuses HS,NOWDT,NOPROTECT,NOLVP,NOBROWNOUT,NODEBUG
#use delay(clock=20000000)
#use rs232(baud=115200, xmit=PIN_C6, rcv=PIN_C7, ERRORS)


#include "string.h"
#include "enfora1218_driver -12-02-2013.c"
#include "flex_lcd.c"


Change .h file
Change Clock
Change Baud.
Change SMSDriver name
Change LCD driver

that should compile for a 16F877A

then, for hardware:

1) power the module
2) connect directly to your PC.
3) using AT Commands Setup Baud Rate to 9600
4) using AT Commands Disable FLow Control <-----99% Chance this is the problem
5) Do not power down modem!
6) connect serial com from pic to Modem
7) reset PIC only.

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: Tue May 07, 2013 8:40 am     Reply with quote

Hi Praful,

First of all, you still have not told us what GSM modem you are using!! I'm
also a bit perplexed by your hardware setup! I see only three wires
connecting your GSM modem to your PIC board. I don't see any means that
external power is being applied to the GSM modem, so I assume it's getting
power from the PIC board? If so, then I expect four wires connecting the
two boards: Vcc, Gnd, TxD, and Rxd. As it stands now, you seem to be
missing a connection!

Your GSM modem has a DB9 connector, so I assume it has a MAX232
type device on board? If so, is there a way to disable the RS232
interface (remove the MAX232, remove jumpers, etc.)? If we knew what
modem you were using, we'd be in a much better position to help!

John


Last edited by ezflyr on Tue May 07, 2013 8:45 am; edited 1 time in total
Gabriel



Joined: 03 Aug 2009
Posts: 1067
Location: Panama

View user's profile Send private message

PostPosted: Tue May 07, 2013 8:43 am     Reply with quote

Reading my old notes I remembered something else:

AFTER you tried what i told you in my previous post, if it doesnt work, try swaping the TX/RX lines between the PIC and Modem.

its a DTE vs DCE issue
http://en.wikipedia.org/wiki/RS-232

usually people use hyperterminal like this:

Step 1:
PC---> MODEM
DTE--> DCE

Step 2:
PC---> PIC
DTE--> DCE

Step 3:
and then they try to conect PIC to MODEM and this happens

PIC--> MODEM
DCE--> DCE

and that does not work.

so try swaping the TX/RX lines.
so that:

PIC--> MODEM
DTE--> DCE

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: Tue May 07, 2013 9:05 am     Reply with quote

Hi Guys,

Just to be clear on the hardware interface between the PIC and the GSM
modem, it can be RS232 or it can be TTL levels. Personally, I prefer a TTL
interface because it's simpler and consumes less power.

If the interface is 'RS232' then both the GSM modem and the PIC will need
MAX232 type interface chips. If the interface is 'TTL' then neither the GSM
modem nor the PIC will need MAX232 chips, rather their serial ports will be
directly connected together. In the case of a TTL interface, the RS232
interface on the GSM modem will have to be disabled. Usually this is done
by removing the (socketed) MAX232, or removing some jumpers....

One benefit of an RS232 interface is that the PIC and the GSM modem
can operate at different voltages. In the TTL interface case, they will
share a common operating voltage.....

Based on the posted pictures, I assumed the interface was TTL. Frankly, it
doesn't do much good to remove connections in order to take photos
because it may lead to false assumptions!

John
Praful



Joined: 18 Jun 2012
Posts: 23

View user's profile Send private message

PostPosted: Tue May 07, 2013 9:37 am     Reply with quote

Dear masters,
There is seprate power supply to both boards that three wires stands for rx,tx and ground only . As I mentioned in previous post only for taking photo removed )the adpter which is a supply for modem (sim300). Because I took the board outside the house and there was only one socket so I only connect uC's suly pin to show LCD message. That's all .......
Gabriel



Joined: 03 Aug 2009
Posts: 1067
Location: Panama

View user's profile Send private message

PostPosted: Tue May 07, 2013 9:57 am     Reply with quote

EZFLYR's concern is that if your board has a MAX232 chip on board and you are by-passing it, if its not physically disconected your coms wont work because the Modem RX pin will be driven by the MAX chip and your PIC....

My concern is that if you are bypassing the modem serial port to use TTL, you are not driving the Flow control pins properly, so ive asked you to disable it on the modem.


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: Tue May 07, 2013 11:27 am     Reply with quote

Hi Gabriel,

Sigh! The *real* problem is that we are only able to make educated guesses
about the OP's hardware because after about six explicit requests, they have
still not told us which specific GSM modem they are using! This thread is
evolving into a classic one where the OP withholds crucial information, and
we need to extract it (seemingly) from them, kicking and screaming..... I
cannot over-emphasize that a project like this begins at the hardware
level
, yet the OP seems to be completely oblivious to that, and it instead
focusing on 'tweaking' the firmware......

John
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2, 3  Next
Page 2 of 3

 
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