EmbeddedRelated.com
The 2024 Embedded Online Conference

PIC 16-bit timer problem

Started by PigPOg in comp.arch.embedded19 years ago 3 replies

Can anyone advise please? I am running a PIC18F252 from a 4MHZ crystal and I want to use TMR0 (in 16 bit mode) to generate a time delay of 10...

Can anyone advise please? I am running a PIC18F252 from a 4MHZ crystal and I want to use TMR0 (in 16 bit mode) to generate a time delay of 10 seconds. Firstly, despite clearing TMR0IP, I can't get the program to branch to the 18h interrupt vector. I have got this part set correctly as I can service a port level change in another part of the program. So, I decided to just poll the TMR0I...


PIC18F252 Interrupts

Started by PigPOg in comp.arch.embedded17 years ago 2 replies

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...

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...


Pic18f252 usart problem

Started by PigPOg in comp.arch.embedded16 years ago 5 replies

Hello all I'm probably overlooking the obvious but I can't seem to get the USART on the 18F252 working. I've tested Port RC6 to see if...

Hello all I'm probably overlooking the obvious but I can't seem to get the USART on the 18F252 working. I've tested Port RC6 to see if anything is being transmitted but the output remains high. I suspect that I haven't configured the associated registers properly or the Test Routine is wrong. Using other code I know the port works OK. Below are a few details, can anyone advise please? ...


Compiling code

Started by Mike Burch in comp.arch.embedded16 years ago 15 replies

Hello fella's I know I am completely out of my league with this question but I have to ask anyway. Be gentle. :-) I have built this clock...

Hello fella's I know I am completely out of my league with this question but I have to ask anyway. Be gentle. :-) I have built this clock because it is really cool! and it is completed up to the point of programming it. It uses 3 pic18f252 micro controllers. 1 controller is a master and 2 respond as slaves. I don't know how to do this. I think it would be like flash programming a bio...


Interfacing a pic18f2520 microcontroller with a cell phone

Started by Lusweti in comp.arch.embedded15 years ago 3 replies

Hi, I'm Lusweti. I am working on a project where i have a PIC18F2520 microcontroller taking readings from some sensors and displays them on...

Hi, I'm Lusweti. I am working on a project where i have a PIC18F2520 microcontroller taking readings from some sensors and displays them on a 2*8 LCD screen. I need it to further send these readings directly to a cell phone via usb interface. I am designing software to enable the phone to send these data to a website once it receives it. Now the problem is on how to build an interface betwen...


programming pic18f2550

Started by cibi in comp.arch.embedded18 years ago 1 reply

Hi everybody, i'm not very skilled in pic programming, however i have sucessfully programmed pic16f84 with a Shaer programmed build by...

Hi everybody, i'm not very skilled in pic programming, however i have sucessfully programmed pic16f84 with a Shaer programmed build by myself. Now I want to program a pic18f2550, because I want to use USB capability. Do you think my programmer should work properly? Should I make some variation? The software i used is IC-Prog, wich does not seem to support this device? Does anyone know wha...


IR network for PIC-processors

Started by Kristoffer Ek in comp.arch.embedded13 years ago 16 replies

Hi, I have built timer/controllers for 10 kodak dias caroussels with a pic18f2550 microcontroller, and I want them to communicate to each...

Hi, I have built timer/controllers for 10 kodak dias caroussels with a pic18f2550 microcontroller, and I want them to communicate to each other. Therefore I put a IR-LED and a IR-receiver on the pic's serial port and want to build some kind of ir protocol to broadcast settings over the network. All caroussels can not "see" all the other ones, so each caroussel has to retransmit received...


PICKIT 2 development help on MPLAB or Piklab or any other IDE on a PIC18F2620

Started by ssylee in comp.arch.embedded17 years ago 2 replies

I have been trying to use the PICKIT 2 programmer option within MPLAB IDE, but it seems like the option to do so is disable as shown...

I have been trying to use the PICKIT 2 programmer option within MPLAB IDE, but it seems like the option to do so is disable as shown in http://imagebin.ca/view/86lX0hhQ.html. I have also tried to update the firmware of my PICKIT 2 separately on the software provided on the Microchip website, but it keeps on freezing regularly every time I have attempted to check my PIC18F2620 to see if it is ...


PIC18F2620 sample code in a sample project in MPLAB

Started by ssylee in comp.arch.embedded17 years ago 4 replies

I'm currently using MPLAB's C18 compiler to build a hex file from a simple "hello world" program to flash onto the program memory of...

I'm currently using MPLAB's C18 compiler to build a hex file from a simple "hello world" program to flash onto the program memory of a PIC18F2620 in order to see if I can perhaps create a program to toggle a pin to get started. However, I have been getting the following error in the pastebin link from the Build window: http://www.pastebin.ca/684463. I'm using a PICKIT 2 programmer from Microc...


getting started on C programming on PIC16F628A, PIC16F690, OR PIC18F2620

Started by ssylee in comp.arch.embedded17 years ago 4 replies

I'm trying to get started with C programming on either one of the PIC microcontrollers in MPLAB IDE using C18 compiler (or any other C compiler...

I'm trying to get started with C programming on either one of the PIC microcontrollers in MPLAB IDE using C18 compiler (or any other C compiler that Microchip makes), however, I'm having some trouble drafting a source code that has, for example, LEDs flashing or display a "Hello World" message through printf() and in such fashion that I can see it on a host computer. Does anyone know any good...


Accessing general I/O addresses

Started by ssylee in comp.arch.embedded16 years ago 10 replies

I apologize in advance if I didn't cross-post properly. I want to write a .c and .h file controlling a DS1302 real-time clock using a PIC18F2620...

I apologize in advance if I didn't cross-post properly. I want to write a .c and .h file controlling a DS1302 real-time clock using a PIC18F2620 microcontroller. I want to keep my RTC code's pin usage flexible, so I want to write an initialization routine that reads in the pins that the whole program wants to use in main.c and have RTC.c and RTC.h refer to the wanted pins. I am having trouble...


Atmel

Started by Peter Keller in comp.arch.embedded16 years ago 19 replies

Hello, I've done some PIC development before, with the PIC16F690, PIC18F4321, etc. and I'm thinking about trying out the Atmel processors...

Hello, I've done some PIC development before, with the PIC16F690, PIC18F4321, etc. and I'm thinking about trying out the Atmel processors since I've heard they have a flat memory space (no banks), a software stack, and other things I am interested in. What would be a good entry level atmel microprocessor to experiment with (maybe having features like USART, SPI, USB, external data/program ...


schematic of a motor controller circuit using pic18f4331

Started by vibz86 in comp.arch.embedded15 years ago 1 reply

Can someone help me out with the scematic of the motor controller with PIC18f4331, l298 and a quadrature encoder. I already implemented the...

Can someone help me out with the scematic of the motor controller with PIC18f4331, l298 and a quadrature encoder. I already implemented the motor controller with a pic 16f877a, but later I had to abandon that idea as 16f doesnt support quadrature encoder modules.. I adjusted the 16f circuit diagram for 18f4331 , but It doesn work.. 18f4331 has additional PWM pins. what r they used for? I read the ...


Servo motor controller with pic18f4331

Started by vibz86 in comp.arch.embedded15 years ago 5 replies

Im new to micro controller programming and I urgently need a program for servo motor controller(dc motor controller with a single ended...

Im new to micro controller programming and I urgently need a program for servo motor controller(dc motor controller with a single ended quadrature encoder) using pic 18f4331. I googled it for on many occasions but found nothing. I would prefer in mikroc. Will someone be able to share their coding with me as It would be a great help as Iam already lagging in my final year project... regards ...


problem to activate correctly pic18f442 PWM module

Started by El75 in comp.arch.embedded20 years ago 1 reply

Dear Sirs, I work with PIC18F442,Fosc =16 MHz and want to generate PWM 4 KHz with Duty cycle of 50% through CCP2 Module. The duty cycle,...

Dear Sirs, I work with PIC18F442,Fosc =16 MHz and want to generate PWM 4 KHz with Duty cycle of 50% through CCP2 Module. The duty cycle, I've received, is too small and the PWM period is not correct (3.76 KHz). An other one problem is that the duty cycle is not permanent. Probably I didn't understand correctly how to initialize. What's wrong with this ? void Start_Buzzer(void) { ...


Configuring Port A, Pin 4 as a general I/O pin in the PIC18F442

Started by Anonymous in comp.arch.embedded17 years ago 1 reply

Hello World, I'm using the PIC18F442 and I can't seem to configure Pin 4 of Port A to be a normal I/O Pin. I've tried to disable the T0CON...

Hello World, I'm using the PIC18F442 and I can't seem to configure Pin 4 of Port A to be a normal I/O Pin. I've tried to disable the T0CON register that also has functionality on that pin and I still can't use the pin as a general I/O pin. I need it for a project and I have already made the PCB board so that pin has to work. Can anyone help me? Thanks a million.


PIC problem

Started by 2Penny in comp.arch.embedded19 years ago 1 reply

Ladies, Gentlemen: I'm somewhet new although I've been lurking here a while. I've got a problem I hope someone has some...

Ladies, Gentlemen: I'm somewhet new although I've been lurking here a while. I've got a problem I hope someone has some insight into. I bought the PICDEM2+ with ICD2 combo. I was interested in learning the PIC assembly language, but now I'm solving a 3 phase power problem and bought a couple of pic18f4431 processors and stuck one in my PICDEM2+ boa...


Minimum PIC18F4431/ICD2 arrangement

Started by 2Penny in comp.arch.embedded19 years ago 3 replies

Gentlemen: I've put together 68k embedded systems using my employer's ICE equipment, but what is the minimum amount of electronics necessary...

Gentlemen: I've put together 68k embedded systems using my employer's ICE equipment, but what is the minimum amount of electronics necessary to setup the p18f4431 utilizing Microchip's ICD2 equipment? Once operating I'll explore PWM, LCDs, A/D interfacing and all that on my own, but I'm needing a push or hint at this moment. Current setup isn't quite enough. Thanks in advance. 2Pe...


Quick help with PIC18F4510 - not debuggable in Large memory model?

Started by larwe in comp.arch.embedded14 years ago 1 reply

Anyone have experience working with this part and Hi-Tech C (lite)? I've got a weird problem and I'm not sure my workaround is correct. I have...

Anyone have experience working with this part and Hi-Tech C (lite)? I've got a weird problem and I'm not sure my workaround is correct. I have connected only a debug header per the ICD2 LE instructions, with a reset pullup and no other hardware. Put a scope probe on RA6 and another on RA0, and trivial pin-wiggler. If I try to build it in debug mode and debug it, everything appears like it wor...


PIC18F452 & C18: capture module set-up ?

Started by Rodo in comp.arch.embedded20 years ago 4 replies

Hi all, I've been trying to set up the ccp1 on this MCU for two days now. I got to the point where I have the ccp1 irq working (here is the...

Hi all, I've been trying to set up the ccp1 on this MCU for two days now. I got to the point where I have the ccp1 irq working (here is the irq fragment) //------------------ code fragment begins ----------------------- if (PIR1bits.CCP1IF==(unsigned int)1){ newCCPval=ReadCapture1(); newCaptureDataFlag=1;



The 2024 Embedded Online Conference