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

Implementation of BiSS C interface for an encoder

$
0
0
BiSS C DB3 protocol interface for Absolute encoder is Open Source and Free Communication protocol hardware compatible with SSI interface. And it is used widely in absolute position encoders. However searching for sample codes and implementations yields zero results. Most BiSS master are Closed source FPGA based or ASIC like (ICHAUS.de) or some (TI.com) microprocessors.

I want to replace an SSI encoder with BiSS in my DIY CNC machine, because it contains CRC and i want some kind of checksum...

Implementation of BiSS C interface for an encoder

Programming 8051 using MikroC

$
0
0
Hello
I am new to MikroC for 8051, please can someone show me how to assign individual port pins as input and outputs?

STM32 Nucleo and mbed

$
0
0
Hello everybody and thanks always.

This time I would like to ask if someone has tried mbed to program a STM32 Nucleo board.

I have one (STM32F091RC) and I have used mbed to program a couple of examples (LED switching, using a button, etc- basic stuff)
Now the programs seem quite simple.

However I have seen (not tried) programs for the STM32 architecture, and although they are understandable (I am quite fair at C I think), they are much...


STM32 Nucleo and mbed

Embedded system detailed design steps

$
0
0
Hi,

I’m looking for a resources, books or other materials which explains modern day embedded system design in detail. It should include hardware and software design steps. It’s should cover minor steps in detail such selecting hardware components, how to develop software using evaluation board connections and etc. Please suggest any form of resources, books or other materials. Please suggest best once. Thanks.

PIC24F: Make TMR reset with OC module self-sync

$
0
0
Hi. Does anyone know a clean way to have an OC module self-sync but also reset the associated TMR at the same time? I want to do this so that I can use the TMR3 rollover event to trigger an ADC capture at the start of the OC's PWM period. It doesn't appear to be possible to trigger an ADC capture directly from the OC module.

Here's my config:

Code (Text):
  1.  
  2.     //****************************************
  3.     // TIMER3: L pump ON/OFF: 16MHz increment
  4.     //****************************************...
PIC24F: Make TMR reset with OC module self-sync

Can i exchange data between two pics using Led ?

$
0
0
hi all,

doctor request from us to transmit the data between two pics wirelessly .
he don't need to use Rf to do that ,he suggest to use optical way like using LED .

can we do that ?
if yes,how?

thanks in advanced :)

2D string search code

$
0
0
Good day everyone. Please can someone help me with an arduino code that will display each of the string character below on the arduino serial monitor

const char *churchCalender[][ROW][CHAR] PROGMEM = {
{"01/01" , "sunday" , "white" , "Van", "R1 num.6.22-27 R2 Gal.4.4-7 Gos.Lk.2.16-21"},
{"02/01" , "monday" , "white" , "Beat", "R1 1Jn.2:22-28 Gosp.Jn.1.19-28"},
{"03/01" , "tuesday" , "white" , "Not", "R1 1Jn.2:29-3:6 Gosp.Jn.1:29-34"},
{"04/01" , "wednesday" , "white" ,...

2D string search code

Pic ADC, when do you need use the Acquisition Delay?

$
0
0
For no good reason i'm trying to shave some wasted clock cycles out of my project.
I couldnt find any definitive answer on this in the datasheet, or on the microchip website, app notes, etc.
Every source specifies that when you turn on the ADC you have to delay for the holding cap to charge. But if I don't explicitly disable it, or re-enable it, and all i'm doing is changing channels, do i need to bother waiting?
If i think about this, to me it seems that when I change channels, i might...

Pic ADC, when do you need use the Acquisition Delay?

pickit 2 not detecting pic16f877a?

$
0
0
Hello,
How to run pickit 2 not working it is not detecting pic16f877a??

can i transmit a square wave generated by pic mcu using a led and photo transistor ?

$
0
0
hi guys ..

I am using pic microcontroller to generate a square wave with a frequency depends on a temperature which is read from lm35 sensor.

so i need to transmit the square wave wirlessly.
can i do that using a led and photo transistor ?

Regards

PIC24F: ADCs taking longer than expected

$
0
0
Hi, I seem to be losing time in my ADCs. They should be taking 12*Tad = 7.5us but it's more like 10us. I have some simple code below that demonstrates the problem. Does anyone have any idea where the extra time is going and whether my sample point is being delayed or if the conversion is just taking longer than 12Tad? I've confirmed that the clock is running at 32MHz.

Code (Text):
  1.  
  2.     AD1CON3bits.ADCS = 9;  // min.Tad = 600ns, 1FCY period = 62.5ns, therefore 10x = 625ns = 7.5us per 10bit...
PIC24F: ADCs taking longer than expected

8051 assembly get value x from p2 and send x2 to p2 program

$
0
0
Hi
I need help understanding this program or try to answer my question I left as comments
Code (ASM):
  1.  
  2. ORG 0 ; ROM locations starts from 0000H
  3. MOV DPTR, #300H ; DPTR is a pointer starting from 300H ( why choose this adress ? 300h)
  4. MOV A, #0FFH ; Make P1 as an INPUT why choose #0ffh ?
  5. MOV P1, A ;
  6. Back: MOV A, P1 ; get x from P1
  7. MOVC A, @A+DPTR ; get x2
  8.  
  9. MOV P2, A
  10. SJMP Back
  11. ORG 300H
  12. Table: DB 0, 1, 4, 9, 16, 25, 36, 49, 64, 81 ;where do these values come from were they chosen  arbitrary
  13. END
  14.  

Only one count each time on button

$
0
0
Hi
Have this circuit.
The problem is that it count 1-15 times each time switch is pressed.
Direct input to TIMER/COUNTER in MCU ( 16F18877).,

Will it be better to make a IOC on a pin, and then add on to value each time ?

Also i need to change the state of edge,
MCU says rising edge, but my schematic do a falling.

Timer with button PIC16F877A

$
0
0
Hi guys i am developing a timer for my homemade uv exposure box. I wrote some codes and succesfully implement timer into those codes. But what i need is i need a push button which will turn on the timer. For example i have one led connected to RB0 pin and when i plug in the circuit timer starts to count down and the led toggle with every flow. But when i plug in the circuit i dont want the timer to start counting. I want it to start when i push the button. So can anyone help me with this? I...

Timer with button PIC16F877A

Rail-to-rail comparator


How to erase memory?

$
0
0
I have a device which consist of 3 memory Flash memory of 512KB, EEPROM of 2KB and SRAM of 512 KB.
First the connection is made through the software and then the programming is uploaded through Rs232. While uploading the the program is saved to SRAM. When i was running the program in device a message poped up that is

Erase Flash[F000]
Write Flash
[83]

From message i understood that the flash has been erased.
Now, the problem is that the device is unable to get connected through the...

How to erase memory?

PICKIT 3 issue

$
0
0
Hello everyone!
I'm writing a new post since everything I found is pretty old.
I'm having troubles to get a Pickit3 clone to work with MPLABX 3.2
First of all I'm using OS X, but even on a virtual machine with Windows 10 the programmer doesn't work.
The error code that MPLAB shows is:

The programmer could not be started: Could not connect to tool hardware: PICkit3PlatformTool, com.microchip.mplab.mdbcore.PICKit3Tool.PICkit3DbgToolManager

What's strange is that with MPLABX on OSX the...

PICKIT 3 issue

PIC24F: Is there any risk of dirty reads when reading the ADC results buffer?

$
0
0
Hi, to save precious cycles I'd like to avoid interrupting after each ADC acquisition. Sometimes I'm round-robining, other times I'm just repeatedly sampling the same ANx to ensure I have the most up-to-date measurement for some other async function. Is there any risk of dirty reads if I just reference the appropriate ADC1BUFx when the result is consumed rather than using intermediary variables? I don't see any mention of such a risk in the family reference below. However when I have...

PIC24F: Is there any risk of dirty reads when reading the ADC results buffer?

how to load google map in screen

$
0
0
hello,how to display map with gps in screen in embedded projects?

bare metal explanaion

$
0
0
hello guys
i recently got a nanopi m1 board
and i was reading online about how i can install an operating system on it
then i read about bare metal environment
what i know that it is running the controller with no operating system installed
is that a precise definition?
can any one link me to an article about it or maybe explain it further?
thank you
Viewing all 4921 articles
Browse latest View live