Author |
Message |
Topic: NOKIA .C |
ALPL
Replies: 6
Views: 11929
|
Forum: General CCS C Discussion Posted: Wed Mar 20, 2013 12:17 am Subject: NOKIA .C |
A mistake I see in the code is: escreve="olda";
You cannot treat a string (field) like a variable - you need to use eg strcpy(escreve,"olda") ;
or better initialize like thi ... |
Topic: why Pic16f877a UART send unknown characters |
ALPL
Replies: 27
Views: 23622
|
Forum: General CCS C Discussion Posted: Tue Jan 03, 2012 11:02 am Subject: why Pic16f877a UART send unknown characters |
Actually the 'data sheet' has _nothing_ to do with the capacitor values that should be used, unless you are using exactly the crystal models recommended by Microchip....
The _crystal_ will have a spe ... |
Topic: why Pic16f877a UART send unknown characters |
ALPL
Replies: 27
Views: 23622
|
Forum: General CCS C Discussion Posted: Tue Jan 03, 2012 9:50 am Subject: why Pic16f877a UART send unknown characters |
I am using 22pF for 4MHz and I did not change them for 20MHz. Do I need to ?
Check the data sheet first! And then try if the values given by the data sheet work with you project or not - if not -yo ... |
Topic: why Pic16f877a UART send unknown characters |
ALPL
Replies: 27
Views: 23622
|
Forum: General CCS C Discussion Posted: Mon Jan 02, 2012 12:33 am Subject: why Pic16f877a UART send unknown characters |
Er. That will stop the chip running. MCLR needs to be pulled _up_, not to GND.
Best Wishes
Yes, my mistake - you are right. The resistor to the power line (eg 5V) and not to GND.
so, i just n ... |
Topic: why Pic16f877a UART send unknown characters |
ALPL
Replies: 27
Views: 23622
|
Forum: General CCS C Discussion Posted: Sat Dec 31, 2011 10:31 am Subject: why Pic16f877a UART send unknown characters |
Er. That will stop the chip running. MCLR needs to be pulled _up_, not to GND.
Best Wishes
Yes, my mistake - you are right. The resistor to the power line (eg 5V) and not to GND. |
Topic: why Pic16f877a UART send unknown characters |
ALPL
Replies: 27
Views: 23622
|
Forum: General CCS C Discussion Posted: Sat Dec 31, 2011 9:21 am Subject: Re: RS232 misbehaviour |
Next to a possible GND-problem you may not have put a 0.1µF capacitor between Vdd and Vss or the MCLR-pin is not connected/set properly.
the MCLR-pin connected correctly i test it But i did not pu ... |
Topic: why Pic16f877a UART send unknown characters |
ALPL
Replies: 27
Views: 23622
|
Forum: General CCS C Discussion Posted: Fri Dec 30, 2011 10:28 am Subject: why Pic16f877a UART send unknown characters |
Q2: which cellphone do you use? Did you check the cell-phone serial communication parameters/protocol, esp the electrical levels of the comm-lines and the hand-shake protocols?
the Cell phone is T6 ... |
Topic: why Pic16f877a UART send unknown characters |
ALPL
Replies: 27
Views: 23622
|
Forum: General CCS C Discussion Posted: Fri Dec 30, 2011 10:25 am Subject: Re: RS232 misbehaviour |
Next to a possible GND-problem you may not have put a 0.1µF capacitor between Vdd and Vss or the MCLR-pin is not connected/set properly.
the MCLR-pin connected correctly i test it But i did not pu ... |
Topic: why Pic16f877a UART send unknown characters |
ALPL
Replies: 27
Views: 23622
|
Forum: General CCS C Discussion Posted: Thu Dec 29, 2011 5:41 am Subject: why Pic16f877a UART send unknown characters |
Q2: which cellphone do you use? Did you check the cell-phone serial communication parameters/protocol, esp the electrical levels of the comm-lines and the hand-shake protocols? |
Topic: why Pic16f877a UART send unknown characters |
ALPL
Replies: 27
Views: 23622
|
Forum: General CCS C Discussion Posted: Thu Dec 29, 2011 5:21 am Subject: RS232 misbehaviour |
Next to a possible GND-problem you may not have put a 0.1µF capacitor between Vdd and Vss or the MCLR-pin is not connected/set properly. |
Topic: Communicating two pic microcontrollers using UART |
ALPL
Replies: 2
Views: 4699
|
Forum: General CCS C Discussion Posted: Thu May 05, 2011 12:00 pm Subject: Communicating two pic microcontrollers using UART |
Hi , the code cannot work at all. On the receiver side I suggest to use an ISR to catch any incoming data and interpret them in the main function in the while(1)-loop.
As already mentioned: on the ... |
Topic: Interface VB with PIC |
ALPL
Replies: 24
Views: 28842
|
Forum: General CCS C Discussion Posted: Wed Mar 23, 2011 10:36 am Subject: Interface VB with PIC |
This will work for the beginning:
void main()
{
set_tris_c(0b10000000);
enable_interrupts(int_rda);
enable_interrupts(global);
while(1)
{
if (rx=='A')
{
putc( ... |
Topic: Interface VB with PIC |
ALPL
Replies: 24
Views: 28842
|
Forum: General CCS C Discussion Posted: Tue Mar 22, 2011 10:52 am Subject: Interface VB with PIC |
just another tip: don´t use any delays in the interrupt service routines - keep them as short as possible and do most of the work in the main-function |
Topic: Interface VB with PIC |
ALPL
Replies: 24
Views: 28842
|
Forum: General CCS C Discussion Posted: Tue Mar 22, 2011 9:58 am Subject: Interface VB with PIC |
you must enable the interrupts - I added this to the code |
Topic: Interface VB with PIC |
ALPL
Replies: 24
Views: 28842
|
Forum: General CCS C Discussion Posted: Tue Mar 22, 2011 9:51 am Subject: Interface VB with PIC |
Try following (when you press the capital A the LED will turn on - press any other character to turn it off:
#include <16F877A.h>
#fuses HS, NOWDT, NOPROTECT, BROWNOUT, PUT, NOLVP
#use ... |
|