hospitalfert.blogg.se

Hidata mac
Hidata mac















What am I doing wrong here? As an aside, I would love to have a pure C solution (with no inline assembly), but I haven't found a single clear example that isn't missing pieces or referring to library routines that I can't find.

#HIDATA MAC CODE#

I'm selecting the bank, setting the address, selecting the config space, enabling writes, sending the unlock sequence, setting the write bit, but like I said, the value always reads back as 0x3FFF (I expect to see 0x1DAB after the write code has executed). I've tried cherry-picking from the example program-flash-write (Example 10-3, page 94) to come up with the following, but on the subsequent pass through the read code shown above, the value is still 0x3FFF. Unfortunately, I've been completely unable to get anything working to write to those locations.

hidata mac

I have the following code in my project, which correctly shows 0x3F, 0xFF in the hidata, lodata variables when a breakpoint is set at the end: The PIC12F1751/2 datasheet has example assembly code for reading the User ID locations (Section 10.4, page 96). I am programming and debugging a PIC12F1572 using a PICKit 3 in MPLAB-X 3.0 on Windows 7 64-bit, with XC8 version 1.34.

hidata mac

I've been searching high and low for good examples of writing to the User ID locations (I need my code to store two non-volatile 16-bit values each of the four User ID locations can store 14 bits so I should have enough space). Programmatically writing to User ID space on PIC12F1572 in MPLAB-X/XC8















Hidata mac