EmbeddedRelated.com
The 2024 Embedded Online Conference

How do i create an accurate delay

Started by hybrid_snyper in comp.arch.embedded17 years ago 11 replies

Hi all, I am in the middle of coding a PIC16f876 and i require some time sensitive delays. In the milli and micro domains. I am using C...

Hi all, I am in the middle of coding a PIC16f876 and i require some time sensitive delays. In the milli and micro domains. I am using C to program the core functions but i was advised to use ASM to create a delay as it is more accurate. i am clue less on how to go about this and was wondering if anyone new any good resources i could use or if there are any sample codes floating about that ...


Programming Surface Mount PICs

Started by Adam Kumpf in comp.arch.embedded20 years ago 5 replies

Hello All, I am working on a tiny board with a surface mount microcontroller. (PIC16F876A) I have a P16PRO40 programmer, and it works...

Hello All, I am working on a tiny board with a surface mount microcontroller. (PIC16F876A) I have a P16PRO40 programmer, and it works quite well for DIP packaged chips, but there's no easy/good way to program surface mount devices. So I thought it wouldn't be too difficult to pull over the critical lines from the programmer to my new PCB (that has a pic16f876a on it) and program the m...


cmos camera with a pic

Started by peres in comp.arch.embedded18 years ago 13 replies

Hi, i need only to store a picture when an event happens, i want to do it with a pic16f876A, i dont need to do any kind of image processing...

Hi, i need only to store a picture when an event happens, i want to do it with a pic16f876A, i dont need to do any kind of image processing i think, just take a picture and store it into a flash, so my question is what cmos camera do you recomend for this? thank you in advance


PDIUSBD12 USB odyssey,help

Started by blisca in comp.arch.embedded16 years ago

Hi to all in the aim of studying USBprotocol i built a little board including a 9s12 microcontroller and a PDIUSBD12 parallel to USB...

Hi to all in the aim of studying USBprotocol i built a little board including a 9s12 microcontroller and a PDIUSBD12 parallel to USB interface,often called D12 well after spending tenth of hours on it i can't even have the enumeration, i ask desperately help, i started modifying(maybe not in the right way) the code from http://www.beyondlogic.org/usbnutshell/usb7.htm#PIC16F876Example,i...


Help getting an LCD to work

Started by Will in comp.arch.embedded20 years ago 19 replies

I have an Optrex LCD (DMC-20481NY-LY-AGE) that is 4x20 characters and driven by a Microchip PIC16F877 running at 20MHz. I know I got this exact...

I have an Optrex LCD (DMC-20481NY-LY-AGE) that is 4x20 characters and driven by a Microchip PIC16F877 running at 20MHz. I know I got this exact same physical LCD to work before but for the life of me I can't recall what trick I used to do so. Attached at the end is my software. I get power to the LCD, but all I see is lines 1 and 3 as all dark and lines 2 and 4 as all clear. Hunting aroun...


Newbie: Beginner Questions[long]

Started by Sukrit K Mehra in comp.arch.embedded20 years ago 1 reply

Background:I have done interfacing of PIC16f877 and 8051 with an ADC, DAC, stepper motor, LCD etc using port pins. Using this method I...

Background:I have done interfacing of PIC16f877 and 8051 with an ADC, DAC, stepper motor, LCD etc using port pins. Using this method I can interface anything with a uC. 1. I want to learn interfacing using I2C or any other bus. What I don't understand is how are the control/data registers mapped onto the uC i/o or memory space? When I interfaced a LCD, I used the port pins and each pin r...


Eratic PWM behaviour PIC16F877 - my code?

Started by Mike in comp.arch.embedded20 years ago 3 replies

Hi, I am trying to use a lookup table to obtain values for a PWM interval but it's not working. If I use the code in Example 1 it works...

Hi, I am trying to use a lookup table to obtain values for a PWM interval but it's not working. If I use the code in Example 1 it works fine. The code in example 2 fails. PWMPTR has been initialised to 0 before the routine is called for the first time, the call doesn't cross any page boundaries. Can anyone see anything glaringly obvious? Example 1 movlw B'11001111' andwf CCP1CON...


IC2 problem with PIC16F877#

Started by John Smith in comp.arch.embedded16 years ago 6 replies

Hi, Our laboratory recently purchased a MPLAB ICD2 programmer. Everytime I try to program my PIC etheir by using the "Debugger" or the...

Hi, Our laboratory recently purchased a MPLAB ICD2 programmer. Everytime I try to program my PIC etheir by using the "Debugger" or the "Programmer" mode I receive this error: ICD0161: Verify failed (MemType = Program, Address = 0x0, Expected Val = 0x283A, Val Read = 0x0) I looked the forum and people seem to think that it is related to the vdd voltage or maybe that the ICD 2...


Controlling PCF8583 clock chip with a PIC

Started by John Gruenenfelder in comp.arch.embedded19 years ago 4 replies

I have a board set up with a PIC16F877 microcontroller and on the I2C bus I have a Phillips PCF8583 clock/alarm chip. I am attempting to use...

I have a board set up with a PIC16F877 microcontroller and on the I2C bus I have a Phillips PCF8583 clock/alarm chip. I am attempting to use the alarm function of this chip and thus far am having almost no luck getting it to work. I know the I2C bus is good because I have several other devices on it plus the clock function of this chip is working fine. Specifically, no matter what type ...


PIC16F877 and Pins Prob

Started by chris in comp.arch.embedded18 years ago 2 replies

Hi, I have a problem when I tried to activate 3 PINs simultaneously... :-( I have this prob too when I only set 2 Pins which are following...

Hi, I have a problem when I tried to activate 3 PINs simultaneously... :-( I have this prob too when I only set 2 Pins which are following from a simple command; the command will not be executed :-( Has anyone ever had this ? Thanks Chris


Tiny Bootloader for PIC16F877, 20 MHz ,...

Started by Stef Mientki in comp.arch.embedded18 years ago 2 replies

Does anyone have the hex file for this bootloader ? Preferable Baudrate 115.2 kBaud. thanks, Stef Mientki

Does anyone have the hex file for this bootloader ? Preferable Baudrate 115.2 kBaud. thanks, Stef Mientki


PIC "interrupt-on-change" combined with normal input?

Started by Darin Johnson in comp.arch.embedded18 years ago 10 replies

I've got a new project on a PIC16F877 which uses several PORTB pins. 2 of these are "interrupt-on-change", one is the normal INT pin, one is a...

I've got a new project on a PIC16F877 which uses several PORTB pins. 2 of these are "interrupt-on-change", one is the normal INT pin, one is a plain polled input pin, and some are output. (Basically, we want 4 interrupt-on-change pins, but RB6:7 have to be used for in-circuit programming) Is there a safe way to read the normal input pin without messing up the interrupt-on-change pins? T...


Pic16f877 measuring pressure

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

Hi, I want to desing a datalogger.I'm measuring humidity,temperature and pressure. I'm using SHT11 for humidity and temperature. But I haven't...

Hi, I want to desing a datalogger.I'm measuring humidity,temperature and pressure. I'm using SHT11 for humidity and temperature. But I haven't a pressure sensor so instead of it I'm using a potentiometer. I'm using CCS compiler.I'm coding at Pic c.I'm looking MPX4115 for pressure transfer formula. Can someone help me for coding that?It's not important to be MPX4115.I can use different datasheet....


MPLAB error message

Started by kansas_ray in comp.arch.embedded20 years ago 2 replies

Hi to all, I am running MPLAB software to a PIC16F877A microcontroller via a CCS ICD-S20 pod. After downloading the code I get a pop-up with...

Hi to all, I am running MPLAB software to a PIC16F877A microcontroller via a CCS ICD-S20 pod. After downloading the code I get a pop-up with the following error message: "Could not start the target. The target was not halted after reset. Check the target oscillator and MCLR." I am using a 20MHz crystal oscillator from EPSON (working fine). The MCLR circuit is an MCP120-4.5V pulled up ...


PIC16F877A Code problems

Started by Devyn in comp.arch.embedded20 years ago 3 replies

Greetings Everybody! I was trying to use the A/D module in PIC16F877A. I'm using a C compiler (Hi-tech Picclite). The code i wrote passes...

Greetings Everybody! I was trying to use the A/D module in PIC16F877A. I'm using a C compiler (Hi-tech Picclite). The code i wrote passes values to PORTD. The compiler declared the o/p of the ADC as ADRESH and ADRESL, "static volatile unsigned char" type. The code I wrote was :- char a,b; //after adc conversion (which works) //o/p right justified a=ADRESH; b=ADRESL; PORTD=a; //wor...


PIC Buffer

Started by Devyn in comp.arch.embedded20 years ago 2 replies

Greetings All! I've been working on hooking up a PIC16f877a to PC. I find that i can send data from the PIC to the PC (and use C in the PC)....

Greetings All! I've been working on hooking up a PIC16f877a to PC. I find that i can send data from the PIC to the PC (and use C in the PC). However, what i also want to do is send data from PC to PIC(just 8 bits at a time really). Here's more info :- Mode of connection : Parallel Port (no buffer ..aha..) On the PC : Win98 I hooked up the para port directly to the PORTD. Now, there ...


"SLEEP" Mode repetition

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

Hi All! I have a PIC16f877a. I want to work with the device mainly in sleep, wake on RB change, do some stuff (say led blink) and go back to...

Hi All! I have a PIC16f877a. I want to work with the device mainly in sleep, wake on RB change, do some stuff (say led blink) and go back to sleep. This code works fine if i put the blink code in the ISR. How do i use this code in the main program in C? I tried :- main() { // initialization of interrupts etc... s1 :asm("SLEEP"); asm("NOP"); RE0=0x1; delay(); a fn. for 1s delay ...


Pic and ICSP

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

I shoud program a PIC16f877A with a jdm based programmer (PIC-PG2: http://www.olimex.com/dev/pic-pg2c.html) and IC-prog. I found a schematic...

I shoud program a PIC16f877A with a jdm based programmer (PIC-PG2: http://www.olimex.com/dev/pic-pg2c.html) and IC-prog. I found a schematic for ICSP connection with a jdm-programmer (http://www.jdm.homepage.dk/icsp.htm) but i used instead 1n4448 diode a 1n4148. It doesn't works. Someone can help me? Thanks -- I have a little dreidel, I made it out of clay And when it's dry and ready,...


David Tait's FPPDOS v0.9 with PIC16F877A?

Started by Michael in comp.arch.embedded19 years ago 2 replies

Anyone successfully programming 16F877A with FPPDOS v0.9? --- Michael

Anyone successfully programming 16F877A with FPPDOS v0.9? --- Michael


PIC 16F877: ORG-ing EEPROM

Started by Michael in comp.arch.embedded18 years ago 8 replies

What memory location should the beginning (lowest address) of flash EEPROM be ORG'ed for the PIC16F877A? Maybe this info is located in a F87x...

What memory location should the beginning (lowest address) of flash EEPROM be ORG'ed for the PIC16F877A? Maybe this info is located in a F87x data sheet or the mid-range ref. manual but I haven't found it. There are copious references to EEADR, EEDATA, etc., but no example of ORG-ing in an ASM file. Microchip seems to have hidden this vital info. very well. IIRC, I discovered this info....



The 2024 Embedded Online Conference