Tagged Questions
1
vote
1answer
113 views
How to understand the block diagram of microcontroller Architecture
I am started learning pic18f4550 controller . I find it difficult to understand the architecture block diagram . i cant understand how peripherals, cpu core (eg ALU), data bus , program bus are ...
2
votes
2answers
80 views
Where are the UART Rx and Tx pins on a dsPIC33FJ32MC202?
I'm a beginner to micro-controller and now learning Microchip's dsPIC. I'm trying to use UART with RS232 to communicate with my laptop, but I can't find out where the Rx and Tx pins are on the chip.
...
5
votes
3answers
372 views
Fastest way to toggle a bit in ASM
What's the fastest way to toggle a bit1 in MPASM for the 14-bit enhanced instruction set? (I'm working with a PIC16F1829)
The code has to be standalone - I mean that it can be called on any moment, ...
1
vote
1answer
57 views
How to get 10bit data of ADC using SPI protocol
I am doing Single master multiple slave implementation.
Master - PIC18F4550
Slave - PIC18F4520
A potentiometer is connected to the Slave. Slave will convert the Potentiometer value to digital and ...
3
votes
1answer
54 views
Figuring out the functions of PIC numbers in a data file
I'm using Bumblebee software to interface my Wisp648 PIC programmer. According to the list of supported files for the Wisp, I should be able to program a PIC16F1829. However, that chip isn't supported ...
1
vote
1answer
48 views
PIC16: Out of Data Space - Make use all available banks
I'm using a Microchip PIC16F1825 with the XC8 (v1.12) compiler and defining some arrays (size between 16 and 64 bytes). I was able to declare them (linker output below). However, as soon as I try to ...
0
votes
3answers
315 views
How to learn dsPIC UART program based on PIC USART experience?
I've learned USART of PIC16F883, and I want to learn UART of dsPIC33FJ64MC802.(Actually I need to learn dsPIC, but I learned PIC16F883 first since I thought it's easier to learn.)
Here's my circuit ...
6
votes
3answers
265 views
Switching from PIC to AVR [closed]
I have worked with PIC16 and PIC18s for over three years now and would like to get to know AVR as well. I have no specific project in mind, but would like to try around with the different ...
6
votes
3answers
156 views
How to calculate day of the week for RTC?
I am using MCP7940 RTC from microchip it requires to enter the day of the week as part of updating RTC with date. So how should I calculate day of the week based on the date provided by the user ?
5
votes
3answers
302 views
Ethernet connector and transformers
I'm working on an Ethernet connection for a PIC18F4620 with the ENC28J60. I found a useful article here, with a schematic:
I see I need transformers between the RJ45 connector and the Ethernet ...
2
votes
1answer
98 views
Would a high priority interrupt interrupt another high priority interrupt?
In the datasheet of the 18F4620 and others, section 9.0 (page 91), I read:
The PIC18F2525/2620/4525/4620 devices have multiple interrupt sources and an interrupt priority feature that allows most ...
0
votes
0answers
102 views
RF Link with APC220 between two PIC16F877's
I am attempting to communicate through a RF link between two PIC16F877's using APC220 Radio Transients. When the PIC UART's are connected with wires between TX and RX they communicate just fine, but ...
0
votes
2answers
99 views
Read from UART seems to overwrite while in buffer
I am reading sending data to a PIC32MX7xx using UART. The data frames are all 6 bytes long, no exception.
The problem I am facing is that when there are 6 bytes waiting to be read and I send another ...
6
votes
3answers
251 views
How do I program a PIC12?
I have a PIC12F675 that I need to program. I'm using a Pickit 2 and the Pickit 2 software. Supposedly I should be able to program it using this circuit, but the Pickit 2 software is not detecting the ...
1
vote
2answers
110 views
I2C with PIC32 and MCP4706 Not Working
We're working on a battery charger for an electric bicycle at the moment, but prototyping with a PIC32MX695F512H kit board and an MCP4706 DAC soldered onto a breakout board, programmed using a ...
3
votes
3answers
165 views
Why pic18fxxx microcontrollers is better for C language
Pic18fxxx family has a lot advantages and improvements from the pic16fxxx family of microcontrollers. What is the particular feature that make them better for C programming than the pic16fxxx devices? ...
5
votes
2answers
136 views
Save energy with PIC project
I want to implement a device with 2 push buttons. When I press the first button, it will increment a counter. When I press the second, the number of times the first one was pressed (counter content) ...
0
votes
1answer
180 views
RE: USART @115200 on PIC18 explorer (PIC18F8722)
I have tried to initialise UART1 and communicate with a PC with no success @115200, as the SPRTG register, which needs to be 4.4253, cannot be so without introducing a large error.
The board has ...
1
vote
1answer
118 views
dsPIC: Using FRC and OSC2 as an I/O pin
My question is about using FRC as an oscillator source and OSC2 pin as an I/O pin.
In several different manuals on dsPIC30F chips (ex: DS70139G, page 126) it is written:
...
4
votes
1answer
98 views
RGB and SRGB difference and their use
I am working on a project which include displaying RGB colors. I would like to know what is the difference between RGB and SRGB. Is it possible to have srgb colors in led. As SRGB has been used for ...
0
votes
2answers
159 views
General Questions about PIC24 MCU Input and Output Pin Impedance, Voltage, and Current
I'm having a mental lapse. Try and help me make sense of a few basic things concerning microcontroller pins at the hardware level, please!
Correct me if I'm wrong… in the circuit of Figure 1 (see ...
0
votes
2answers
180 views
Using the C18 compiler on Mac OS X
I'm currently in a microcontrollers class, one where we use the PIC18F4550 and must use the C18 compiler (something Windows oriented and used for grading). I'm trying to install this on Mac OS X, and ...
0
votes
0answers
143 views
Compare result from UART
I am using an UART connection to a WiFi module.
The module uses commands to be configured.
I want to check the response of the module ("AOK") to know if the commands are interpreted correctly.
My ...
6
votes
1answer
161 views
dsPIC chips running at a fraction of normal speed
I have two PCBs. One has a dsPIC30F6012a, the other a dsPIC30F6015. Both are being programmed from separate standalone HEX projects in MPLAB X, using a PICkit 3. Both firmwares have been applied to ...
7
votes
3answers
373 views
Absolute address of a function in Microchip XC16
Device: dsPIC33FJ128GP802
I have some *.s files as follows
...
-4
votes
1answer
118 views
Starter PICs in all device families [closed]
I want a list of PICs that are easy to start with in every device family. That is:
8-bit: PIC10, PIC12, PIC16, PIC18
16-bit: PIC24F, PIC24H, PIC24E
16-bit ds: dsPIC30F, dsPIC33F, dsPIC33E
32-bit: ...
5
votes
2answers
773 views
Using multiple external interrupts in PIC
I've used PIC16F877 (datasheet) for several projects. For a single external pin change interrupts, you can use PORTB0 interrupt. ...
0
votes
1answer
154 views
Problem with PIC18F46J50 family USB enumeration
I am having an issue with getting my PIC18F46J50 device enumerated. I think this is the problem because when I plug in my device, I get the "USB device not recognized error". Also, PID and VID are ...
3
votes
1answer
809 views
How to offset program location in memory with MPLABX XC8?
I have a bootloader residing at locations 0x0000 to 0x0fff on an 8-bit PIC18F. How do I tell the XC8 compiler to output a hex file which starts at 0x1000?
With a CCS compiler my friend is using, he's ...
3
votes
2answers
260 views
DsPIC development board recommendation
In a few months I should begin developing a power converter and I was told I should get used to dsPIC. The currently used model is "dsPIC30F6010" which is kind of "old" (compared to the newer ...
3
votes
1answer
74 views
PIC18F13K50 Has two or one Half Bridge control?
Since the PIC18F13K50 has one ECCP, and it can operate in single, full and half bridge, I dont undestand if it can drive 2 half bridges at the same time, or just one...it appears to be just one ...
-1
votes
2answers
138 views
PIC18F2550 or PIC18F13K50?
The PIC18F13K50 is a lot cheaper than the PIC18F2550...but it seams to be smaller, newer, same speed, just has less RAM. Why is it cheaper? Just because it is a new one and Microchip dont like to ...
2
votes
3answers
366 views
MPLAB XC16 compiler outputting 8-bit HEX files for PIC24?
I am trying to understand a HEX file I compiled with Microchip MPLAB X IDE using the Microchip MPLAB XC16 Compiler.
Concerning the MCU, I am targeting the PIC24EP512GU814. However the scope of this ...
0
votes
1answer
164 views
PIC Write-Protect Behavior
When I write protect a PIC using the config bits, does it prevent all future programming or can I still reprogram the part if I erase it first? I assume this behavior should be standard across all ...
0
votes
2answers
82 views
PIC24E writing address and increment for ICSP programming
I am trying to program my Microchip PIC24EP512GU814 in ICSP mode. The resource I'm using to do this is the Microchip dsPIC33E/PIC24E Flash programming Specifications (70619B) and the Microchip ...
1
vote
2answers
266 views
Why are the PIC “F” models popular?
I recently started a project and decided I required a PIC24E. I've been looking for resources to use an Arduino or Serial port to program the MCU, but none of the articles I found support the PIC24E.
...
2
votes
0answers
242 views
How do I modulate PWM frequency in realtime with a Microchip dsPIC (or PIC24)? [closed]
This question is a direct continuation of the question/answer found at the link below. Skip to the last answer/comments given, as this is where my question begins (I don't have enough rep. points to ...
6
votes
1answer
478 views
Using Timer0 overflow to gate Timer1 on PIC12F1822
I am trying to use TMR1 to count TMR0 overflows. To do this I am using TMR1 with gate ...
4
votes
5answers
770 views
What is the difference between Interrupt on Change and External Interrupt on PICs
What is the difference in function between IOC and EXT Interrupt on a PIC? I am currently using a PIC12F1822, and apart from the extra layer of checking you have to do with IOC (i.e. which pin caused ...
2
votes
1answer
205 views
DECFSZ won't work on PIC16LF1823
I have a problem while trying to do a Delay on a PIC16LF1823. My program tries to toggle some bits on PORTC for 30ms. I did a simple Delay based on the decrement of a variable; however, each time the ...
2
votes
3answers
314 views
Make linker use bank 0 in relocatable mode
I'm tryin to build assembly project with MPASM/MPLINK for PIC16F628A. Microchip advice that it's better to stay on bank 0 and switch whenever you want different bank, and then get back to bank 0 (to ...
3
votes
1answer
165 views
Can't read written data out of 24AA1025
I've got a PIC18F with MSSP that I'm interfacing with a 24AA1025. I'm using MPLAB 8 and the functions from C18 to make my life easier. The only problem is that I've (supposedly) written a byte to ...
3
votes
3answers
306 views
Microchip PIC10 (8 bit microcontroller) learning reference. Where to start?
So I've generally learned how to use an Atmel Attiny13a, but now I have found that I need to switch to a Microchip PIC 8 bit microcontroller such as the PIC10 series.
Can anyone give me some good ...
3
votes
2answers
398 views
How to create a pointer to code memory in microchip C30
i'm having a bit of a problem with this code. The code is intended to create an LCD MAP, with LCD routines to interface a 7 segment based LCD with the PIC24FJ128GA310 MCU with internal LCD driver.
...
3
votes
2answers
465 views
Reccomendations of PIC microcontrollers
Since some of you may already read some of my posts here where I wrote that I preferred AVRs/ARMs may wonder why now I want to know something about PICs.
Though one may like them or hate them, they ...
6
votes
3answers
710 views
EEPROM read/write errors on dsPIC
I'm running a Microchip dsPIC30F6012a. I have this chip on several PCBs, all running the same software, and observe the same problem on all of them. This implies a systemic problem, not a one-off ...
3
votes
3answers
454 views
Which schematic is better for keypad connection to an MCU?
I have this three keypad connection sketches, all of which i've seen in various application, and some i've also used, but i want to know if there is any advantage of one over the other.
The keypad ...
2
votes
2answers
187 views
Using Microchip's dsPIC33E USB Starter Kit
I'm a student and I'm starting a project in which I'm working with the Microchip's dsPIC33E USB Starter Kit.
I used some samples taken from this site
for initiating, sending and receiving packets. ...
4
votes
2answers
4k views
C/C++/C# programming for interfacing USB to PIC microcontroller
I am a computer sciences student looking to do some PIC microcontroller programming for some small home projects . I am fluent in C/C++/C#/Java and i also have an understanding of programming ...
6
votes
3answers
272 views
Extraneous loop produced by PIC compiler from MicroChip
We're using the Lite version of the MicroChip PIC compiler so maybe that's the reason, but this simple one-bit shift is generating a loop where none is necessary. Since the shift count is 1 (a ...
