| Details | Message |
|---|
Read-Only Author ry uran Posted 6-Oct-2002 09:23 GMT Toolset None |  putchar and getchar ry uran i have read Mark Odell's UART driver. However,the code size is too large for me.
can i just using the simple function call:
char x,y; getchar(y); //get char from urat x=y; putchar(x); //put char to urat
is it possible to do that in keil?
|
|
Read-Only Author Andrew Neil Posted 7-Oct-2002 00:36 GMT Toolset None |  RE: putchar and getchar Andrew Neil Of course it is - it will use Keil's Library implementations of putchar and getchar. But it won't be interrupt driven, and only supports the "standard" 8051 UART.
Keil also have an interrupt-driven example in the downloads section - I dunno if it's any more compat than Mark's. |
|
Read-Only Author Andrew Neil Posted 7-Oct-2002 00:39 GMT Toolset None |  RE: putchar and getchar Andrew Neil ...not that Mark's driver looks like bloatware to me anyway! |
|
Read-Only Author Mark Odell Posted 7-Oct-2002 15:03 GMT Toolset None |  RE: putchar and getchar Mark Odell Too large? Code or data? If code, eliminate all the access functions for setting UART options. Just hard code the thing for a given baud, EOL translation, etc. That'll save you some code space.
Next, reduce the ring buffer sizes for better data compactness. Let me know what size you hope for in code and data, I'll see if I can get you there. |
|
Read-Only Author Nicol Carstens Posted 11-Apr-2005 14:32 GMT Toolset ARM |  RE: putchar and getchar Nicol Carstens Where can I get hold of Mark Odell's (or similar) interrupt driven UART driver? I am looking for code to replace putchar() and getchar() with interrupt driven circular buffers...
thanks. |
|
Read-Only Author Mark Odell Posted 11-Apr-2005 14:39 GMT Toolset C51 |  RE: putchar and getchar Mark Odell I can email it to you if you like.
- Mark |
|
Read-Only Author Reinhard Keil Posted 12-Apr-2005 09:34 GMT Toolset C51 |  RE: putchar and getchar Reinhard Keil Maybe this helps: http://www.keil.com/download/docs/intsio.zip.asp
Reinhard |
|
Read-Only Author Drew Davis Posted 13-Apr-2005 00:29 GMT Toolset C51 |  RE: putchar and getchar Drew Davis http://www.8052.com/codelib.phtml |
|
Read-Only Author Nicol Carstens Posted 19-Apr-2005 08:05 GMT Toolset ARM |  RE: putchar and getchar Nicol Carstens Thanks for the info, guys. Will check out the links.
cheers, nicol. |
|