- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi,
i am trying to sending and receving data fom uart. for that i am wrote the attached prog.
my problem is i can send a pre-defined charater to uart .but not get charater to uart .
i used Rx interrupt.
- Labels:
-
PSoC 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
On creator start page, "Example Projects", there are 2 projects you
can look at using UART.
When uploading a project to forum, use IE or Firefox, Chrome has problems.
Regards, Dana.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Probably you tried to use P0_5 as input to UART, but it is not connected to Rx. Use RI1[1] as input to Rx.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi,
oop's thanks for figureout the error.
after correcting the error i am able to Rx the chararter but it's only one time second time there is not responce from controller.
is it required to re initalised the UART interrupt. or any other problem. please help me to get UART Rx charater when ever i send to controller.(echo)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You made an LJMP to your Rx-interrupt handler, but you did not declare uart_rx_isr to be an interrupt handler, the corresponding #pragma is commented-out. Move it to the top and uncomment it.
Additionally you do not recognize in your main() whether a character arrived, you constantly fire-out rxchar whatever its value might be. There is a programming technique for problems like yours named "Circular Buffer". This allows the isr to put accepted characters into a buffer from where they can be read later. Ask mrs. Google.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Don't forget to modify boot.tpl (interrupt vector) in your root project directory -
From -
org 3Ch ;PSoC Block DCC13 Interrupt Vector
`@INTERRUPT_15`
reti
to this
org 3Ch ;PSoC Block DCC13 Interrupt Vector
ljmp _uart_rx_isr
reti
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Dana,
no need to modify boot.tpl, have a look into boot.asm: modifications have been made automatically. Jump to the isr was supplied in UART.asm.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think Dana's method is the way to go. You only need to change the tpl once.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content