Quantcast
Channel: Microcontrollers
Viewing all 4921 articles
Browse latest View live

Designing a simple alarm circuit using microcontroller

$
0
0
I am designing a simple alarm circuit using PIC12F629 and I need advise from this forum of experts on how I could accomplish and fine tune the circuits. The alarm input set the GP0 High and flashes an LED through Mosfet. When the GP1 set high, GP0 should remain high steadily. There is also a lamp test but it is outside of the microcontroller.
Please see the attached circuit for your reference. View attachment 120002

Timer code for PIC18f to toggle led for 1 second

$
0
0
Hi All,

I am facing issue in toggling led for 1 second using timer0,
led is connected to RB7 of PIC18f.
Though i can insert delay_ms(1000); and toggle led i wish to do it using timer and interrupt.



Here is my code :

#code
Code (Text):
  1. void main()
  2.   {
  3.   ADCON1 = 0x0F;  // Disable Analog functions
  4.   ANSELA=0;
  5.   ANSELB=0;
  6.   TRISB = 0x00;
  7.   PORTA = 0x00;
  8.  
  9.   T0PS2_bit = 1;     // 256 prescalar
  10.   T0PS1_bit = 1;
  11.   T0PS0_bit = 1;
  12.   PSA_bit    = 0;       // source from FCPU 5MHz
  13.   T0CS_bit   = 1;...
Timer code for PIC18f to toggle led for 1 second

CAMA-AFM31 USB Capacitive Fingerprint Module with FPC1020 pin configuration

$
0
0
I have a CAMA-AFM31 USB Capacitive Fingerprint Module with FPC1020. I am new to it and i cannot figure out what its pin configuration is. I have searched everywhere but am unable not find its datasheet. I just need to figure out its power, ground and tx/rx pins.Please can someone provide me with some help? I have attached the necessary pictures of the module.
Thanks in advance. View attachment 125048 View attachment 125049

Designing a simple Treadmill Controller based on Power Track Pro 97370

$
0
0
My treadmill broke down and I want to design a controller and LCD display using PIC16F88. I started on the power for the DC Motor that is being controlled by a mosfet with the current sense circuit in case it is overloaded. My concern is the current sense which I get from this forum is of a different ground potential from PIC. My question is, can it sense even if of different ground potential and what is the reference if you measure it? Please find the attached drawing for your reference....

Designing a simple Treadmill Controller based on Power Track Pro 97370

Calculate yaw with magnetometer and accelerometer

$
0
0
Hello everyone, can anyone help me with a doubt about physics and magnetometers ?
In my project I need to calculate the pitch and the yaw using a chip with magnetometer and accelerometer (FXOS8700CQ), I get the raw values which are integers with a resolution of 16 bits (0-65535). The chip has auto-calibration i know this by the datasheet (http://www.nxp.com/assets/documents/data/en/data-sheets/FXOS8700CQ.pdf).
I can calculate the pitch knowing the raw values of accelerometer is 3...

Calculate yaw with magnetometer and accelerometer

arduino avr boards updation

$
0
0
I am using IDE 1.6.9....... And after updating Arduino AVR Boards to v. 1.6.12, I can no longer uplload to board. Going back to v. 1.6.11 and it works again.Tried this on Arduino Mega2560 and Nano. Same result.Any idea? Confused i have just bought Arduino products from this site <SNIP> in pakistan

Moderators note : removed YOUR commercial link, when placed again, you will be banned.

Dragon Board 12Plus- HCS12 micro- KeyPad and 7Segment LED

$
0
0
I'm trying to display two digits on the 7 segment LED display for the project I'm doing. So far I can only display one digit and when I press the second button the first number completely erases and display the 2nd digit. Here is the code I wrote so far. The function "ScanKeyPad()" outputs 0-15 which corresponds to the keypad number. So basically when I click 4 and 8 it should display 48. Below is the C program.
Code (Text):
  1.  
  2. while(1)
  3.      {
  4.         key = ScanKeyPad();
  5.         if(key != 16) // If a...
Dragon Board 12Plus- HCS12 micro- KeyPad and 7Segment LED

stupid question 8051

$
0
0
i want to send instructions to my 8051 like MOV , i conected it via serial then used tera term but can'ts send them from there
how can i talk to it and read a timer for example ?

Need Help for Membrane Switches Prototype with Low Budget

$
0
0
Anyone can recommend a membrane switch manufacturer with fast prototyping? I only have few budget for that.
Thanks in advance.

I2C on Arduino ... Adding a brordcast packet / protacol

$
0
0
I have decided to use I2C for a project. I am going to use buffers to extend the range to some 10's of meters.
I will be using its multi-master implemtation so that nodes can transmit status updates when they need to, in response to changes in the world.

Now I could have every node keep track of everything that is on the bus and transmit a copy of its data everything that is present but doing that is only slightly better than having a single master poll everything and then update everything...

I2C on Arduino ... Adding a brordcast packet / protacol

Mechanical encoder interfacing and quadrature

$
0
0
Hello,how can I write encoder interface software.where can I find sources and informations about mechanical encoder

What is this IC dimension mean

$
0
0
Hello everyone

I have a simple question.

when I read or work with some microcontroller I always face a term with a micro meter, for example, the following microcontroller was built with 0.8 um technology or 0.3 um or any number.

what is this number represent? why is this number described as technology? and what is the benefit of this number to IC user?

thank you in advance

Square Wave Generation Accuracy/Resolution around 100kHz

$
0
0
Hi all,

I'm currently having an issue figuring out how to attain decent resolution when generating square waves around 100kHz. I am looking for a very cost effective solution, I may add.

For example, I am currently using a microcontroller. It's cheap and it can generate square waves pretty easily. But when working around 100kHz with a 16MHz clock you can only divide by clock cycles to reach a particular frequency.

An easily understood example, say it takes one clock cycle for square...

Square Wave Generation Accuracy/Resolution around 100kHz

8051 Can you explain to me this program

$
0
0
Hi
Can somebody please explain to me this program line by line I tried googling for the instruction didnt understand the program as a whole


MOVC A, @A+DPTR ; what is this instruction doing
MOV DPTR, #MYDATA what do we need to do this
MOV R2, #5 ; same question
Code (ASM):
  1.   cseg at 0
  2.     jmp 100
  3.   cseg at 100
  4. /* 5. Assuming that ROM space starting at 248H contains “Shiue”, write a program to
  5. transfer the bytes into RAM locations starting at 37H using indexed address mode (6
  6. points)*/...
8051 Can you explain to me this program

Interrupts- HCS12 - DragonBoard12+

$
0
0
I'm building a clock for 12 and 24 hour format. After setting the current time i need to run the clock. I need interrupt method to select either one of them. here is my way and can somebody tell me what I'm doing wrong? I use Codewarrior and C language. This is just part of the program that involves interrupts.

Code (Text):
  1.  
  2. #include "C:\Users\Lohitha\Documents\Codewarrior Data\HCS12Utilities\hcs12.h"    
  3. #include "C:\Users\Lohitha\Documents\Codewarrior Data\HCS12Utilities\delay.h"
  4.      
  5.  
  6. void...
Interrupts- HCS12 - DragonBoard12+

Can I replace PLC with an Arduino?

$
0
0
hi,
i need to do a small automation. it is an industrial one. i need the feasibility of using arduino there.

Using external crystal oscillator on Freescale MC9S08SH8

$
0
0
Dear Group:

We have a Freescale MC9S08SH8 data sheet: http://www.mouser.com/ds/2/302/MC9S08SH8-783274.pdf
We're on the Freescale Demo Board DEMO9S08SH8/SG8 user guide: http://www.nxp.com/assets/documents/data/en/user-guides/DEMO9S08SH8UG.pdf
Using Codewarrior v10.6

We are using an external crystal oscillator with the RTC. We can not seem to figure out the code to get the two in harmony.
Our code is as follows:

// Use external clock (32.768kHz crystal), based on table...

Using external crystal oscillator on Freescale MC9S08SH8

BLE GATT communication of large values

$
0
0
Hi,

I have for some time now looked into the GATT protocol to use this in a Bluetooth Low Energy application.

I have come to the point where I am able to set up a service with multiple characteristics.

My question now is:
I want to be able to read/write an IP address over BLE, also I would like to be able to read a table of values over the BLE.
How do I set this up? this far I have only set up characteristics with one value, but need to be able to read the struct as shown below:

struct...

BLE GATT communication of large values

Has anybody used camera on i.mx 6ull based platform?

Raspberry Pi 3 Programming

$
0
0
Recently I purchase raspberry pi from this online store <SNIP> first time i'm using raspberry pi :) and i need to program it but i don't know Python language can any one guide me.

Moderators note : removed (notworking) commercial link
Viewing all 4921 articles
Browse latest View live