Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

PIC16F877 + Nokia 6210

Status
Not open for further replies.

kyo

New Member
i really need help about our project...

we have pic16f877 to sniff the nokia 6210's inbox message and outbox message... but nothing happen...can any1 help me about our program and hardware...

we connect the PIC TX to Max232 TXin then the Max232 TXout to the DB9 Male RX

then the PIC RX to Max232 RXout then the Max232 RXin to the DB9 Male TX..is this correct then we used 18.432MHz crystal and FBus Cable

here's the program..it will just acknowledge to the lcd that there is a response from the phone that the pic requested...

#include <pic.h>

#define CMDLEN_GETFOLDERSTAT 18

void sendbyte(unsigned char);
void receive();
void transmit();
void initUART();

void LCD_data(unsigned char);
void LCD_inst(unsigned char);
void initLCD();
void delay(int);

unsigned char CMD_GETFOLDERSTAT[] =
{
0x1E, 0x00, 0x0C, 0x14, 0x00, 0x09, 0x00, 0x01, 0x01,
0x6B, 0x00, 0x0F, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00
};

unsigned char rcdata;
unsigned char flag;

void main(void)
{
int count = 0;
unsigned char temp = '1';

__CONFIG( 0x3d31 );
TRISA = 0x00;
TRISB = 0x00;
TRISC = 0xC0;
TRISD = 0x01;

initLCD();
initUART();

while( RD0 )
continue;

LCD_data( temp++ );

delay(2000);

transmit();

for( count = 0; count < CMDLEN_GETFOLDERSTAT; count++ )
{
sendbyte( CMD_GETFOLDERSTAT[count] );
}

LCD_data( temp++ );

delay( 2000 );
receive();

for( ;; )
{
if( flag == 1 )
{
if( rcdata == 0x1e )
LCD_data( temp++ );
flag = 0;
}
}

}


void initUART()
{
SPBRG = 9;
RCIE = 1;
PEIE = 1;
GIE = 1;
}

void sendbyte( unsigned char tmp )
{
while( !TXIF )
continue;
TXREG = tmp;
}

void transmit()
{
TXSTA = 0x24;
RCSTA = 0x80;
}

void receive()
{
TXSTA = 0x04;
RCSTA = 0x90;
}

void interrupt serial_isr()
{
if(RCIF && RCIE)
{
rcdata = RCREG;
flag = 1;
}
}


void initLCD()
{
delay(2000);
LCD_inst(0x38);
LCD_inst(0x06);
LCD_inst(0x0F);
LCD_inst(0x01);

}

void LCD_inst(unsigned char x)

{ delay(1000);
PORTB = x;
RA0 = 0;
RA1 = 0;
delay(1500);
RA1 = 1;
}

void LCD_data(unsigned char data)

{ delay(2000);
PORTB =data;
RA0 = 1;
RA1 = 0;
delay(2000);
RA1 = 1;
}

void delay(int x)
{
while(x--);
}
 
kyo said:
i really need help about our project...

we have pic16f877 to sniff the nokia 6210's inbox message and outbox message... but nothing happen...can any1 help me about our program and hardware...

we connect the PIC TX to Max232 TXin then the Max232 TXout to the DB9 Male RX

then the PIC RX to Max232 RXout then the Max232 RXin to the DB9 Male TX..is this correct then we used 18.432MHz crystal and FBus Cable

here's the program..it will just acknowledge to the lcd that there is a response from the phone that the pic requested...

For a start ignore the phone, connect to your PC and run Hyperterminal (or similar), and confirm the program works before attempting to connect to your phone.
 
thanks for the reply...
we have already done that...yes it works we made a program to sniff the 6210 but without the pic...

can u tell me what's the appropriate circuit.... thus our connection really need the max232 since we are using PIC-Based and as far as i knw that it the 6210 won't go more than +5Volts?
 
our main obstacle of our project is to read the inbox messages or outbox messages of N6210 and display the message in the LCD through PIC16F877...we already display the inbox and outbox messages but through a 6210 DataCable connected to N6210 and Serial Port of PC...then as we transfer it to a PIC-Based it won't work...i don't know why... we have used 115200bps using 18.432Mhz, PIC16F877 I/P, max232 and DB9 Male Connector..

please share me any comments or idea or information about our project..please help me this is our Design Project Course to complete my college degree..please help me

here's my email:
meet_khirbz@yahoo.com
 
kyo said:
thanks for the reply...
we have already done that...yes it works we made a program to sniff the 6210 but without the pic...

I meant the other way, connect the PIC to the PC to confirm it's working OK.

can u tell me what's the appropriate circuit.... thus our connection really need the max232 since we are using PIC-Based and as far as i knw that it the 6210 won't go more than +5Volts?

From PIC to PC you need a MAX232, or from phone to PC you need a MAX232, from PIC to phone you don't need one. You need to be aware though that the MAX232 inverts the data through it!.
 
does anyone knw how to synchronize the baud rate of the Nokia 6210 and the pic16f877 w/ 18.432mhz or 20 mhz or 4mhz crystal
 
any idea of our project pls help us...

we have to display the inbox messages or outbox messages of Nokia 6210 to the LCD using PIC16f877

we have this materials:
PIC16F877A I/P
18.432 MHz crystal
4 MHz crystal
14 Mhz crystal

Nokia 6210
Nokia 6210 cable Daup
max232
DB9 male connector
LCD

our problem is the communication of the nokia6210 and PIC16f877 we don't how to synchronized them...
 
kyo said:
any idea of our project pls help us...

we have to display the inbox messages or outbox messages of Nokia 6210 to the LCD using PIC16f877

we have this materials:
PIC16F877A I/P
18.432 MHz crystal
4 MHz crystal
14 Mhz crystal

Nokia 6210
Nokia 6210 cable Daup
max232
DB9 male connector
LCD

our problem is the communication of the nokia6210 and PIC16f877 we don't how to synchronized them...

You look up what baud rate the Nokia uses, then use the 16F877 datasheet to look up the setting for the UART for that baud rate.
 
we have tested the Nokia 6210 Data Cable as we transmit data through the DB9 Male connector then to the 6210 data cable but we can't determine if the data transmitted pass through the data cable...we tested it using the oscilloscope...

another thing:
we are using Fbus mode, it is necessary to use the RTS, DTR, CTS? we're just using the TX,RX and GND...

please help
 
kyo said:
we have tested the Nokia 6210 Data Cable as we transmit data through the DB9 Male connector then to the 6210 data cable but we can't determine if the data transmitted pass through the data cable...we tested it using the oscilloscope...

another thing:
we are using Fbus mode, it is necessary to use the RTS, DTR, CTS? we're just using the TX,RX and GND...

Nokia phones are probably the best documented there are?, if you search on google you should be able to find everything you need to know about Fbus and how to use it.
 
please help me

kyo said:
i really need help about our project...

we have pic16f877 to sniff the nokia 6210's inbox message and outbox message... but nothing happen...can any1 help me about our program and hardware...

we connect the PIC TX to Max232 TXin then the Max232 TXout to the DB9 Male RX

then the PIC RX to Max232 RXout then the Max232 RXin to the DB9 Male TX..is this correct then we used 18.432MHz crystal and FBus Cable

here's the program..it will just acknowledge to the lcd that there is a response from the phone that the pic requested...

#include <pic.h>

#define CMDLEN_GETFOLDERSTAT 18

void sendbyte(unsigned char);
void receive();
void transmit();
void initUART();

void LCD_data(unsigned char);
void LCD_inst(unsigned char);
void initLCD();
void delay(int);

unsigned char CMD_GETFOLDERSTAT[] =
{
0x1E, 0x00, 0x0C, 0x14, 0x00, 0x09, 0x00, 0x01, 0x01,
0x6B, 0x00, 0x0F, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00
};

unsigned char rcdata;
unsigned char flag;

void main(void)
{
int count = 0;
unsigned char temp = '1';

__CONFIG( 0x3d31 );
TRISA = 0x00;
TRISB = 0x00;
TRISC = 0xC0;
TRISD = 0x01;

initLCD();
initUART();

while( RD0 )
continue;

LCD_data( temp++ );

delay(2000);

transmit();

for( count = 0; count < CMDLEN_GETFOLDERSTAT; count++ )
{
sendbyte( CMD_GETFOLDERSTAT[count] );
}

LCD_data( temp++ );

delay( 2000 );
receive();

for( ;; )
{
if( flag == 1 )
{
if( rcdata == 0x1e )
LCD_data( temp++ );
flag = 0;
}
}

}


void initUART()
{
SPBRG = 9;
RCIE = 1;
PEIE = 1;
GIE = 1;
}

void sendbyte( unsigned char tmp )
{
while( !TXIF )
continue;
TXREG = tmp;
}

void transmit()
{
TXSTA = 0x24;
RCSTA = 0x80;
}

void receive()
{
TXSTA = 0x04;
RCSTA = 0x90;
}

void interrupt serial_isr()
{
if(RCIF && RCIE)
{
rcdata = RCREG;
flag = 1;
}
}


void initLCD()
{
delay(2000);
LCD_inst(0x38);
LCD_inst(0x06);
LCD_inst(0x0F);
LCD_inst(0x01);

}

void LCD_inst(unsigned char x)

{ delay(1000);
PORTB = x;
RA0 = 0;
RA1 = 0;
delay(1500);
RA1 = 1;
}

void LCD_data(unsigned char data)

{ delay(2000);
PORTB =data;
RA0 = 1;
RA1 = 0;
delay(2000);
RA1 = 1;
}

void delay(int x)
{
while(x--);
}
i need the circuit diagram on zimo161985@YAHOO.COM
 
hello .
i have realy get stuck with project i tought that i finish seaching on the web i have been seaching over month for a solution for this

shortly i have same problem

i have nokia 6210 i send at commands trough hyperterminal works ok
i have pic 16f877 i send from it to pc at commands it works also ok
but when i connect pic with mobile there are no response i tried to take output before max232 it send data but not correct and if i conncet it after max232 there are no data

so ifigured that i have to change capacitors or max

so what sould i do

i'm very thankful in advance for any help
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top