
Forums Search for: MPLAB
MCC18 / PIC C18 - how to write to internal EEPROM?
inI'm new to C and am trying to write a byte to the internal EEPROM in a 18F45k20. I've done this in the past using assembly but now I'm...
I'm new to C and am trying to write a byte to the internal EEPROM in a 18F45k20. I've done this in the past using assembly but now I'm working in C I figure there should be a function for doing this. I've found reference to write_b_eep and read_b_eep on the net but cannot see any reference to these in the MPLAB C18 Compiler Libraries documentation. What is the way to approach this? ...
writing to Program memory in PIC controllers
inHi! With reference to the...
Hi! With reference to the doc http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=38003&start=all&postdays=0&pos torder=asc ,it's possible to write directly into the program memory section in AVR controller ,I would like to know whether it is possible to follow a similar kind of procedure for PIC controllers as well. (I use an MPLAB v7 for programming the PICs ) Thanks in
PIC32 starter kit impressions
inI got PIC32 starter kit today. Here are some impressions: - Comes with eval version of C32 C-compiler with 64KB code size limit. C32 is...
I got PIC32 starter kit today. Here are some impressions: - Comes with eval version of C32 C-compiler with 64KB code size limit. C32 is actually called C32-gcc, so it's a gcc derivative. The source is on the website, but who knows if it's recent or complete. - Hardware debugging (breakpoints, goto cursor) works in MPLAB on this little board, but I found that sometimes it gets int...
Programming my PIC chip in Linux
I'm running Ubuntu Linux. I have a C project that I want to compile and upload to my PIC chip (the PIC16F684 to be exact). I've already...
I'm running Ubuntu Linux. I have a C project that I want to compile and upload to my PIC chip (the PIC16F684 to be exact). I've already gotten the PIC Lite C complier from htsoft.com, but I need an application for uploading the machine code to the chip. Windows users use a thing called MPLAB, but I can't get this for Linux. Can anyone please suggest a Linux alternative? I don't nee...
Dummy C18 question re using header files
inHopefully someone can point me in the right direction without too much mirth...... I'm using an generic 4x16 LCD with a Pic + MPLAB + ...
Hopefully someone can point me in the right direction without too much mirth...... I'm using an generic 4x16 LCD with a Pic + MPLAB + C18 free compiler. I need to use the xlcd.h header file. The xlcd.h file is supplied with the C18 package and seems to be where pins for the LCD control etc are defined. Do I simply copy this file into the project directory and edit it? ...
C18 calculation question - novice...
inI'm trying to interface a SHT21 humidity sensor to a PIC (and learning C18 along the way, MPLAB, C18, PIC18LF44K22). A 16 bit serial value,...
I'm trying to interface a SHT21 humidity sensor to a PIC (and learning C18 along the way, MPLAB, C18, PIC18LF44K22). A 16 bit serial value, S_RH, is read from the sensor. To convert this value into relative humidity, RH, it needs to be inserted into an equation. RH = (125 x S_RH)/ 2^16 - 6 The data sheet gives a test value of S_RH = 25424 giving RH = 42.5% which works nicely. ...
linux toosl for PIC32MX development
inHi, I'm going to be doing some PIC32 development and I'd love to do it under linux if I'm able. We have a PIC32MX and the Microchip ICD2...
Hi, I'm going to be doing some PIC32 development and I'd love to do it under linux if I'm able. We have a PIC32MX and the Microchip ICD2 "hockey puck" JTAG. I don't care so much about an IDE - I'd rather build my stuff using emacs/gnumake. But what I need are: 1. A cross-compiler/assembler/linker that runs under linux 2. The debugger. Keep in mind we also have the MPLAB software ...
pic16f877a uart c code problm
inHai to all, Iam trying to communicate from pic 16f877a to the pc's hyperterminal at 9600 baud rate. Iam posting my code for this. Iam able...
Hai to all, Iam trying to communicate from pic 16f877a to the pc's hyperterminal at 9600 baud rate. Iam posting my code for this. Iam able to simulate with mplab but I could not implement with hardware. I checked for max232, rs232. They seem to be working perfect. But iam not getting the data through hyperterminal comm port. My crystal oscillator is 8mhz. /* uart serial communicati...
How to write unit tests for embedded C code?
inI have inherited a project with xxxx number of lines of C code to be assembled and executed on a PIC microcontroller. As you might expect, once...
I have inherited a project with xxxx number of lines of C code to be assembled and executed on a PIC microcontroller. As you might expect, once I did this nothing happened and I am left swinging in the wind about what went wrong. Although I might be able to fix this using the MPLAB ICD debugger, I am convinced that writing unit tests for the code will highlight any bug(s) in the code and i...
PIC 18 Series - HS+PLL Enabled Clock Mode
inHi I am using a PIC18F452 with an external 8MHz crystal. I am trying to enable the HS+PLL Enabled mode, the device programs okay, and...
Hi I am using a PIC18F452 with an external 8MHz crystal. I am trying to enable the HS+PLL Enabled mode, the device programs okay, and when read back, the configuration values are correct, however, in use, the device is still running at 8MHz. I am using MPLAB 6.62 with an ICDII. Can anyone suggest a reason why the PLL may not be working. Thanks John Lucas
Programming dsPIC33FJ32GP302
inI am trying to program a dsPIC33F chip with a programmer from microchip (ICD3 debugger and programmer), and I am also using the explorer...
I am trying to program a dsPIC33F chip with a programmer from microchip (ICD3 debugger and programmer), and I am also using the explorer 16 development board also sold by microchip. So far, all I have is MPLAB as the development environment but my back ground in assembly language is very weak. I am looking for a C compiler that it's free or reasonable in price to be able to program the dsPIC33...
How to view the Data memory.......
inDear all, Can any one please help me to view the data memory using MPlab ide? I store an array of size 256. I need to view the...
Dear all, Can any one please help me to view the data memory using MPlab ide? I store an array of size 256. I need to view the data. Thanks in advance Siva
Microchip ICD 1 with USB->serial converter
inI have a Microchip ICD 1 in circuit programmer/debugger that I've been using for awhile now. My new computer only has USB ports unfortunately,...
I have a Microchip ICD 1 in circuit programmer/debugger that I've been using for awhile now. My new computer only has USB ports unfortunately, and the ICD is only serial. I bought one of those Belkin USB -> serial port converters, but MPLAB doesn't seem to recognize the ICD. I've confirmed the correct port and speed settings. Is there something I'm missing? Does the USB-> serial converter
simulation tutorial? Asynchronous interrupts?
inI'm writing simple programs for a PIC 16F877A. Attempting to simulate with MPLAB. Linear code...no problem. But I've never written a...
I'm writing simple programs for a PIC 16F877A. Attempting to simulate with MPLAB. Linear code...no problem. But I've never written a program that didn't have multiple asynchronous interrupt inputs and timers. The MPSIM seems to fall apart in that instance. Yes, there are ways to simulate inputs, but the asynchronous nature is where all the problems happen. State another way, no pro...
CAN-settings for PIC18F4585
inHi, I 'm programming a PIC18F4585 with MPLAB. I want to use the CAN option and I have made the basic C and H files with the aplication maestro...
Hi, I 'm programming a PIC18F4585 with MPLAB. I want to use the CAN option and I have made the basic C and H files with the aplication maestro of Microchip. I 'm working on a clock frequency of 40MHz. These are the settings I have calculated for a baudrate of 125k. #define BAUD_RATE_PRESC 16 #define SJW_TIME 1 #define SAMPLES 1 #define PROP_TIME 2 #define PH_SEG_1 4 #define PH_SEG...
PIC16F452 WDT time-out problem
inDear Sirs, I've developed a product on basis of PIC16F442. On some conditions my unit goes to the SLEEP mode and wake up from the SLEEP on WDT...
Dear Sirs, I've developed a product on basis of PIC16F442. On some conditions my unit goes to the SLEEP mode and wake up from the SLEEP on WDT time-out or on an interrupt. The postscaler,I've taken, is 64, giving us 64 * 18msec = 1.152sec. I tested it with MPLAB ICE-2000 and found everything is OK. But then I burned the real chip(I have only PIC16F452) and found that the WDT time-out is 1...
PIC 18f4550 and Hi-tech PRO compiler
Right just started a little project using the 18f4550 for usb and wanted to save some data in the internal eeprom. Easy or so i thought, as i...
Right just started a little project using the 18f4550 for usb and wanted to save some data in the internal eeprom. Easy or so i thought, as i am using Hi-tech PRO 18 V9.63 PL3 i thought i would use th eeprom_read and eeprom_write commands. So to test i used MPLAB and put a message in the eeprom and checked my read routine, OK, and so as my checksum failed i tested the write routine and NOT...
ICD 2 for PIC12F509
inI'm trying to program/debug an 8 pin PIC12F509 (8 pin version with 8 DIP packaging) with the AC162059 header. The MPLAB IDE claims that...
I'm trying to program/debug an 8 pin PIC12F509 (8 pin version with 8 DIP packaging) with the AC162059 header. The MPLAB IDE claims that the chip is there, and I try and program it and it all claims that it was sucessfull...when in fact the pic wasn't even in the socket. Also, it seems to "simulate" the chip wihout the chip in there. When I try and download the file registers while in debug...
dsPIC software Interrupt generation problem
Hi, I have been using dspic30f4011, for the external interrupt if the Pin is defined as input. So how the user can generate interrupt...
Hi, I have been using dspic30f4011, for the external interrupt if the Pin is defined as input. So how the user can generate interrupt by manually changing the port pin status in MPLAB SIM ? Because once its defined as input user cannot modify the PORT value. Is there any alternate or only option is to use ICD tool
PIC18F252 Interrupts
inCan anyone shed some light on this problem please? It's likely to be something simple that I've overlooked. I'm using MPLAB 7.5 running on XP...
Can anyone shed some light on this problem please? It's likely to be something simple that I've overlooked. I'm using MPLAB 7.5 running on XP SP2. It's simple assembly code that services INT0 on the falling edge of port RC0 and services INT1 on the falling edge of RC2. Everything works OK except that should RC2 become active while INT0 is being serviced, as soon as the INT0 ISR completes...
