I am looking for C code for a software RS232 port. I need 2 separate ports on 1 PIC, 1 can be the USART, the other must be implemented in software. Thanks Vic
It's called "bit banging", search for "PIC bit bang serial io"
I made some modifications in the xlcd.h but the microcontroller don´t refletc the changes. I know I have to recompile the xlcd lib but I don´t know how to do it. Could someone explain me step-by-step? Thanks in advance!
replies: there are batch files to do that. one of them is called makeonep.bat if i remember correctly. This is all explained in the microchip library reference documents which you can download from the microchip site. i'm sure you read those already, didn't you?+
Hello, after attempting several peoples code for driving a Hitachi HD44780 based LCD I am confused. I happen to be using a Optrex DMC16106A, which is a 16x1 display. I have this connected via PortB (data) and PortD (ctrl) on a 18F452 Microchip processor. The processor works fine as I can write simple routines to blink LEDs and everything works fine. When I attempt to initialize the LCD and write a few characters, the display lights every pixel in every character position. I know I can doing something, because without the code the display remains totally dark. I have tried assembly routines as well as C routines all with no luck. I am using the C18 C compiler and MPLAB 6.0 with no luck. I have even tried using their XLCD libraries to start from scratch again nothing. Does anyone have any routines that work with the 18FXXX? I would love some recommendations. Thanks Russ Larson
replies: LCD = all black means not initialised. The Microchip xlcd libs definately work. You need to recompile the libraries once you've edited the .h files to reflect the port/pin you;ve connected your LCD. Did you do that? If not it's probably a timing issue. With the xlcd functions, you need to provide your own timing functions - make these wait a lot longer - maybe 10 or 20 times as long. Then if it works, slowly tighten up the timings. Additionally, make sure you're waiting at least 100ms or so after power on before you initialise the LCD- they take some time to settle down. If you're still stuck, please join and post to the mailing list.+
|file: /Techref/microchip/language/c/ios.htm, 8KB, , updated: 2018/10/9 04:14, local time: 2021/3/8 07:16,
|©2021 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?|
<A HREF="http://www.sxlist.com/techref/microchip/language/c/ios.htm"> PIC Micro Controller C Routine Input / Output Library</A>
|Did you find what you needed?|
Welcome to sxlist.com!
& kind contributors
just like you!
Please don't rip/copy
Copies of the site on CD
are available at minimal cost.
Welcome to www.sxlist.com!