electronics forum

Rules | Recent posts | topic RSS | Search | Register  | Log in

help me in mikroC usart


Post new topic  Reply to topic    EDAboard.com Forum Index -> Microcontrollers -> help me in mikroC usart
Author Message
suwaii



Joined: 21 Jan 2006
Posts: 62


Post23 Jan 2008 12:46   

usart mikroc


hi



i try to use PIC18F452 to send data to hyperterminal but i do not
get anything . I user hyperterminal in the mikroC compiler and i put
it in the HEX display but i do not get any thing may be the mistake
come from code.....can any one tell me what is the problem in this code
and correct it even itry to use code of example of usart in the mikroC help
but without result:


void main()
{
int chunk = 0x1E;

TRISC = 0b10101111;
SPBRG = 0b00011001;
TXSTA = 0b00100100;


do {
Usart_Write(chunk);
} while (1);


}
Back to top
saeed_pk



Joined: 20 May 2006
Posts: 199
Helped: 5
Location: Islamabad, Pakistan


Post24 Jan 2008 7:26   

mikroc usart


what is chunk?
and know you do not need to initialize SPBRG just write Usart_init(9600);
it initialize at 9600 baud remember u must have set the same bausd for ur terminal
Back to top
BooM



Joined: 30 Aug 2007
Posts: 77
Helped: 2


Post24 Jan 2008 9:13   

mikroc uart


hi,

because I am curious Please tell me if you use easypic3 board... I have done a project like you want and it works.
I can sent it to you if you want and you can change it as you want!


B.
Back to top
Google
AdSense
Google Adsense




Post24 Jan 2008 9:13   

Ads




Back to top
suwaii



Joined: 21 Jan 2006
Posts: 62


Post24 Jan 2008 16:29   

microc usart hardware


you mean i should use easypic3 board to wok........................
i connect the pic with max232 and from max232 to PC and i use hyper terminal in the Pc and also the hyper that is in the mickroO compiler still i get nothing even if i use same example in the help in the mikroC but not work tell me wht is the correct circuit....................i heard you should use put and print function
Back to top
BooM



Joined: 30 Aug 2007
Posts: 77
Helped: 2


Post24 Jan 2008 17:24   

mikroc usart example


so.....

check from www.mikroe.com the circuits from boards in order to be sure how you should do the connections.

and take the source in microC.



Sorry, but you need login in to view this attachment

Back to top
BooM



Joined: 30 Aug 2007
Posts: 77
Helped: 2


Post24 Jan 2008 17:26   

usart1 mikroc


also, let me know what happen!

Good LUCK!
Back to top
suwaii



Joined: 21 Jan 2006
Posts: 62


Post25 Jan 2008 17:00   

mikroc printf


still i get nothing.........i comile your code in the attachment i get nothing
did you try it by your self and do we need to use may be put or printf function

thanks
Back to top
BooM



Joined: 30 Aug 2007
Posts: 77
Helped: 2


Post25 Jan 2008 17:27   

usart_write


the code works perfect.

may be you should change the ports depends on your hardware.
Also, are you sure about your connections?

B.
Back to top
suwaii



Joined: 21 Jan 2006
Posts: 62


Post25 Jan 2008 17:30   

usart in mikroc


which port & pin you send the the data from the pic to PC

what i know the pic18f452 has TX/RX in the portC
Back to top
BooM



Joined: 30 Aug 2007
Posts: 77
Helped: 2


Post26 Jan 2008 16:47   

uart interrupt mikroc


I don't remember but check the manual from your Pic.
Back to top
funnynypd



Joined: 09 May 2007
Posts: 919
Helped: 21
Location: USA & Canada


Post27 Jan 2008 3:10   

mocroc usart


what's the crystal speed and your target UART speed?
Back to top
amila133



Joined: 13 Oct 2009
Posts: 28
Location: Sri Lanka


Post21 Oct 2009 10:29   

Re: help me in mikroC usart


Hi all,
I also want to parse ASCII(AT Commands) to GSM modem through serial connection?
Pls help me also with simple mikroC example and Hardware configuration.
Back to top
Arabic versionBulgarian versionCatalan versionCzech versionDanish versionGerman versionGreek versionEnglish versionSpanish versionFinnish versionFrench versionHindi versionCroatian versionIndonesian versionItalian versionHebrew versionJapanese versionKorean versionLithuanian versionLatvian versionDutch versionNorwegian versionPolish versionPortuguese versionRomanian versionRussian versionSlovak versionSlovenian versionSerbian versionSwedish versionTagalog versionUkrainian versionVietnamese versionChinese version
Post new topic  Reply to topic    EDAboard.com Forum Index -> Microcontrollers -> help me in mikroC usart
Page 1 of 1 All times are GMT + 1 Hour
Similar topics:
mikroC help (1)
mikroC Help (2)
mikroc debugger help (5)
help on mikroc code (3)
help getc() function MikroC (1)
usart interrupts help... (7)
dspic33f , USART , help me (2)
UART / USART HELP (5)
USB HID library error in MikroC, help needed? (1)
Servo Problems - need your help about my code in mikroC (3)


Abuse || Administrator || Moderators || Support us || sitemap
topic RSS