Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

uart driver for pic16f877a

Status
Not open for further replies.
Hi all/Betwixt,

I now need to implement UART Driver with DSPIC30F6014A. I have gone through the data sheet and the settings to be made. Can anyone please share the code for communication with the hyperterminal? This being a higher end development board does'nt need any connections to be made. I just need to connect the DB9 connector to PC. So hopefully my previous problem of not getting the data transmitted onto the hyperterminal would be solved..!!Please share the C code for the communication with hyperterminal and also regarding the compiler to be used for the same and the baudrate suitable for its communication with hyperterminal.


Thankyou
Swapna
 

Hi all,

Waiting for your response for my query.I also want to know if line feed(LF) and Carriage return(CR) are to be included in our coding for communication with hyper terminal and if so how to include it?? Please respond to all my queries as soon as possible. Waiting for response.

Thankyou
Swapna
 

Hi all,

I downloaded C30 compiler for dsPIC30F controller and tried to build the code for UART. I have included pic30f header file but still I am not able to build it successfully. It is showing register bit fields as undeclared.
example: error: 'UARTEN' undeclared (first use in this function)
This way I am getting an error for all the bit fields that I have used in the code. Please let me know what would be the reason for this as I am unable to debug it. Please help!!

Thank you
Swapna
 

Hi all,

I have resolved the previous problem that I mentioned by including libpic30.h supporting file in which all the registers were declared. Now I need to know the syntax of ISR to be used for dsPIC30F controller. I am getting the following error.
error: syntax error before 'isr'
The syntax which I had been using was void interrupt isr(void). Please let me the proper syntax to be used for this controller!!

Thankyou
Swapna
 

If u have proteus simulation software for with out hardware,we are simulate the program.

- - - Updated - - -

PIC simple uart simulation funtion in PROTEUS SIMULATION.
 

Attachments

  • UART.bmp
    2.3 MB · Views: 116

Swapna, the error probably isn't in the line you quoted but in one of the lines before it. Sometimes in 'C' the error isn't flagged until it causes a problem later on in the source code.
Can you post a few lines of code leading up to the one showing the error please.

Brian.
 

Hi,

The error what I was getting with respect to isr is solved now as I included _isr in the function name. Now the problem what I am facing is, the LPBACK option(loopback) which was working earlier with 8.3 version mplab is not working now with 8.87 version mplab. Earlier I used to get the transmitted data from TXREG to RXREG by enabling the LPBACK bit but now after upgrading the mplab software this option is not working and I am not able to receive what I transmit!!Please help!!Waiting for your earliest response


Thankyou
Swapna

- - - Updated - - -

Hi,

The error what I was getting with respect to isr is solved now as I included _isr in the function name. Now the problem what I am facing is, the LPBACK option(loopback) which was working earlier with 8.3 version mplab is not working now with 8.87 version mplab. Earlier I used to get the transmitted data from TXREG to RXREG by enabling the LPBACK bit but now after upgrading the mplab software this option is not working and I am not able to receive what I transmit!!Please help!!Waiting for your earliest response


Thankyou
Swapna
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top