microchip

Modbus stack for Microchip PIC

有些话、适合烂在心里 提交于 2019-11-30 20:35:28
Can someone suggest an open source implementation of a Modbus RTU Slave for a Microchip PIC18 processor? I'm looking for an implementation of Modbus RTU for RS-232/RS-485, but a Modbus TCP/IP implementation would be welcome as well. I've implemented a Modbus RTU (and ASCII) slave for PIC18 but using USB instead of RS232/485. It would be very easy to convert to RS232/485 though as the protocol code only requires character transmit and receive functions. I can help you with this if required. Take a look at my USB Modbus I/O page at http://www.fieldofcows.com/index.php?title=USB_Modbus_Interface

Is there a way to load a binary file as a const variable in C at compile time

我怕爱的太早我们不能终老 提交于 2019-11-30 13:39:39
I was wondering if there is a way to load an external binary file as a variable in C through an include or a header file or something of the like. For example, in a project I am currently working on I am working with an embedded system that has a graphic display that will do text and minor graphics (boxes, lines, etc.) using ASCII data and commands. But, it will also display monochrome bitmaps. So I have a series of static displays that I use for a user interface, and a couple of bitmaps for splash screens. Now the reason I mention that it is an embedded system is that there is no file system

Modbus stack for Microchip PIC

…衆ロ難τιáo~ 提交于 2019-11-30 03:58:11
问题 Can someone suggest an open source implementation of a Modbus RTU Slave for a Microchip PIC18 processor? I'm looking for an implementation of Modbus RTU for RS-232/RS-485, but a Modbus TCP/IP implementation would be welcome as well. 回答1: I've implemented a Modbus RTU (and ASCII) slave for PIC18 but using USB instead of RS232/485. It would be very easy to convert to RS232/485 though as the protocol code only requires character transmit and receive functions. I can help you with this if

Is there a way to load a binary file as a const variable in C at compile time

空扰寡人 提交于 2019-11-29 19:02:47
问题 I was wondering if there is a way to load an external binary file as a variable in C through an include or a header file or something of the like. For example, in a project I am currently working on I am working with an embedded system that has a graphic display that will do text and minor graphics (boxes, lines, etc.) using ASCII data and commands. But, it will also display monochrome bitmaps. So I have a series of static displays that I use for a user interface, and a couple of bitmaps for

convert ASM to C (not reverse engineer)

旧城冷巷雨未停 提交于 2019-11-27 13:11:35
I googled and I see a suprising amount of flippant responses basically laughing at the asker for asking such a question. Microchip provides some source code for free (I don't want to post it here in case that's a no-no. Basically, google AN937, click the first link and there's a link for "source code" and its a zipped file). Its in ASM and when I look at it I start to go cross-eyed. I'd like to convert it to something resembling a c type language so that I can follow along. Because lines such as: GLOBAL _24_bit_sub movf BARGB2,w subwf AARGB2,f are probably very simple but they mean nothing to

Copy struct to struct in C

偶尔善良 提交于 2019-11-26 07:28:03
问题 I want to copy an identical struct into another and later on use it as a comparance to the first one. The thing is that my compiler gives me a warning when Im doing like this! Should I do it in another way or am I doing this wrong: In header File: extern struct RTCclk { uint8_t second; uint8_t minute; uint8_t hour; uint8_t mday; uint8_t month; uint8_t year; } RTCclk; In C file: struct RTCclk RTCclk; struct RTCclk RTCclkBuffert; void FunctionDO(void) { ... // Some Code /* Copy first struct