Peer-to-peer, engineer-to-engineer questions and answers from the EDABoard.com engineering community around microcontrollers. Click the “Read more” link and follow the entire conversation and maybe add your two cents by logging in to EDAboard.com.
Open Source/Open Hardware MCU board with Eagle/Gerbers available? – I am looking for open source/open hardware projects that have Eagle source files or at least Gerbers freely available. It can be anything related to PIC, AVR, or maybe even other MCUs or FPGAs. Do you know any such projects? Read more
16F628A – internal clock precision? – I have set up my 16F628A with INTOSC and CLKOUT function:
// Precision internal 4 MHz oscillator factory calibrated to ±1% void main() { TRISA = 0; // set direction to be output TRISB = 0; // set direction to be output PCON.OSCF = 1; // Set internal oscillator frequency to 4 MHz PCON = 0x08; do { PORTA = 0; PORTB = 0; Delay_ms(1000); // 1 second delay PORTA = 0xff; PORTB = 0xff; Delay_ms(1000); // 1 second delay } while(1); // Endless loop }
I have set up the circuit on the breadboard and added 100nF capacitor between VCC and VDD. I have also setup “intosc + CLKOUT” config bit in mikroC PRO for PIC. Now, I have measured the output waveform with the old analog scope, and it shows a correct shape but period is 4.7 divs at 0.1uS time base, which means 0.47uS period, which is around 2.12MHz! Even rounding to 5 divs – 0.5uS period gives 2MHz. So now, my question is, am I mistaken with PIC configuration and it’s in fact generating the 2MHz square wave instead of 4MHz, or is there something wrong with my measurement? Read more
How to measure and 3-phase AC PIC16f877a – For this project, I need to measure the voltage from each line and the phase angle. I also need to select the one w the higest voltage on the load and if they are all the same voltage (not less than 180), the controller should choose any one itself. Read more
Connecting two DACs to double the digital to analog precision – I was looking for a DAC for a project. I need at least 16 bits of precision, or maybe even more (few more at least, 18 bits would be good, 24 would be already too much), and I checked here:
http://www.microchip.com/ParamChartS…branchID=11028 but those DACs are only up to 12 bits. My question is, can I use two 12 bits DACs to get 24 bits of precision? Read more
Ultrasonic reading error – I tried ultrasonic coding. But I cannot receive data from the ultrasonic. I am using a PIC18F4550 controller. Read more
DALI communications setup not working – We have an offline, non-isolated 150W LED lamp which is DALI dimmable. In fact, whilst in the factory, before we ship the product, we send it a DALI signal which tells it what power level to start at, when its installed by the customer. However, in the factory, when the mains cable running to the lamp was long, the lamp would not correctly interpret the DALI signal. When we shortened the mains cable, the lamp would correctly interpret the DALI signals. Read more
Scanset issue in C language -While I was trying some online C language quiz, I was stuck in a problem where the constraint was to take strings that only have ‘R’ an ‘S’ letter. I searched it online and got some suitable resource about the scanset http://www.geeksforgeeks.org/scansets-in-c/. However, I have not got a complete answer as I need to take input inside the while statement. Read more
Are these two lines of C code for PIC16F1947 the same? – Our software engineer tells us that the following two lines are the same in every way. Is this true? Do they both execute the same?
(as you can see , one has “!=” and the other has “=!”.
The C compiler is the free one that comes with Microchip’s MPLAB software. Read more
Proteus ISIS: Timing of simulation is way off the mark – I am playing around with timers and counters, I wish to run a blinking LED that blinks every second. Unfortunately, 1 second seems like 15 seconds real time. I was thinking there might be some settings that I am missing. Read more
Connect two PCS via serial port with one microcontroller? – I want to know is it possible to use two COM ports via MAX232 with a single microcontroller? Note that Only one of these com port will be used to communicate. Another one will be standby. If one is not working for any reason, another one can be used alternately. Read more
Leave a Reply