This is a programming language that is at a low level that corresponds with the instruction set of the machine being programmed.

learn more… | top users | synonyms (1)

-2
votes
0answers
45 views

How to initilise SD cards using AVR assembly language [on hold]

I am learning about AVR assembly and I like to interface a SD card. I like to program my Microcontroller with assembly language bevause it's saves lot of memory space. Since in Arduino, SD.h takes ...
4
votes
1answer
101 views

AVR: How optimize cycle-counted ISR to portable code, using inline asm

I'm trying to optimize my RX and TX interrupts to meet maximum execution time of 25 cycles while interrupts are disabled. So far, I have found that code is optimized enough, but pushing and popping ...
1
vote
1answer
51 views

Is there a way to Divide two 8 bit number in PIC 18fXXX assembly language not C?

I Can easily do the division in C of PIC micro controller. But is there a way to divide two number stored in two 8 bit registers. For example look at this code. I have to do it in PIC assembly for 8 ...
4
votes
5answers
1k views

Injecting UUIDs into ROM during production

I'm brand new to electronics and was wondering if someone could explain to me how individual MCU/MPU-powered electronics units can be assigned unique identities on the factory line. For instance, ...
2
votes
1answer
59 views

Fiducial marks on board vs panel

Do I need fiducial marks on both my board and my panel for automated assembly? And how many fiducial marks do I need per board for a round 80 mm diameter board?
0
votes
1answer
41 views

WFI instruction slowing down SYStick interrupt

I've configured my Infineon relax kit for max frequency(120 MHz). I've set my SYSTick for a periodic interrupt of 10 ms. For power saving, I use a WFI assembler instruction whenever my processor is ...
3
votes
1answer
55 views

How to program the ADC10 on an MSP430G2553?

I am currently writing my first serious application with an MSP430 controller (specifically, an MSP430G2553) and I am a bit confused by the documentation as to how I'm supposed to set up the ADC10. I ...
0
votes
1answer
38 views

Bit Addressing in 8051

Can i only use the MOV command (for bit addressable registers like PSW,ACC as well as ports ) with the carry bit? Is the command : MOV PSW.4,ACC.4 work with the assembler? if not why? How can i ...
-4
votes
1answer
76 views

From bitwise instructions to c code intuitively

I need to be able to recognize what an assembly code is doing. I can picture the basic instructions in C code in my head. But bitwise instructions such as ...
0
votes
1answer
55 views

_asm TBLRDPOSTINC _endasm,

I am using a PIC18f25K80 and an XC8 compiler. I have included the files from the MDD library. However, after compiling I get the following in the "FSIO.c" file: ...
0
votes
1answer
35 views

“DB” data directive explaination [closed]

What exactly is initialization of code memory IN 8051? Does the db directive command DB "SAM'' burn data into ROM location? WHAT DOES INITIALIZING WITH A BYTE VALUE MEAN ? I am all confused? I ...
0
votes
0answers
44 views

What is Interruptible-restartable instructions in ARM Cortex M0+?

I am currently reading ARM Cortex M0+ User Guide on ARM website shown below http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0662b/CHDBIBGJ.html In User Manual, following paragraph is ...
1
vote
2answers
84 views

Wrong frequency with Timer1 on Atmega328p in CTC Mode

I want to make a LED blink at a frequency of 0.5 Hz. So, I use an Atmega328p, clocked at 16 MHz, and the Timer1 in CTC mode, which triggers an interrupt every milisecond. Yet, my program, in Atmel ...
0
votes
0answers
27 views

Why avr-as doesn't work?

I've got the following program, in AVR assembly: .DEF WR = R16 .ORG 0 SER WR OUT 0x24, WR When I call ...
1
vote
1answer
33 views

Why do we need to use `avr-objcopy` after `avr-as`?

New to assembly, I'm surprised to see that we need to use avr-objcopy after invoking avr-as, in order to obtain an Intel Hex ...
0
votes
0answers
26 views

Given an instruction sequence for MIPS, show cycle by cycle execution of instructions

I am continuing my practice on instruction sequences for the MIPS processor w/ standard 5 stage pipeline. Here is the problem I am working on: ...
1
vote
2answers
66 views

Writing MIPS assembly and machine code for instructions

I am continuing my practice with MIPS assembly and machine code. I am doing a problem that assumes the following: ...
1
vote
1answer
58 views

MIPS assembly instruction to machine code in hex

I am doing some practice problems involving MIPS assembly instructions and machine code(in hex). I am doing a problem but am uncertain if it is correct. This is the problem, and what I did: ...
0
votes
1answer
63 views

Assembly language that corresponds to machine instruction in MIPS

I am working on a problem that asks for the assembly language that would correspond to the following machine instruction in MIPS: OX3062FF80 Here is what I've ...
-3
votes
1answer
109 views

Using djnz to make a loop in 8051 assembly language [closed]

To program 8051 using djnz loop I know that if we give r0 a number the loop will be executed accordingly. For example: ...
1
vote
1answer
70 views

Pound sign with DPTR 8051

I am learning programming with 8051 and 2051 using Assembly language. About the pound sign (#) I found that it should be used when I am considering an immediate data. Like I found here ...
-3
votes
2answers
72 views

Mixing Assembly and C [closed]

Is it possible to use a mix of these 2? Using a pic4550 and mplabc18 Lets say i have a microcontroller, that in my port B (B0 B1 B2 B3 B4 B5 B6 B7) 1 Byte, I set it to a '00000001' Is it possible ...
0
votes
1answer
45 views

WS2811 RGB LED Strip Timing Issue

I recently purchased addressable RGB LED strips based on the WS2811 chip. These strips have a single data + clock line that uses NRZ style encoding to distinguish between a 1 and 0. The datasheet for ...
2
votes
1answer
58 views

fast(er) extend 8-bit mask to 16-bit for MCU

(Background/purpose: this is a far-out, ideal/overkill approach inspired by a project that handles ultrasonic sensors over bidirectional pins using an 8-channel input capture/output compare.) Using ...
0
votes
0answers
14 views

is an unaligned STR in thumb2 atomic if it is supported by hardware?

This http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.faqs/ka15414.html describes that some cores support unaligned stores but they may take longer if the store spans a 64 bit boundary. My ...
0
votes
1answer
51 views

Are unaligned LDRH/STRH supported on Cortex M3/M0?

Can all Cortex M0/M3 cores do this? LDRH r0, [0x8001] This would suggest yes but I don't see anything specific about Cortex-M cores.
1
vote
1answer
70 views

PWM in 8051 with PCA counter

I read in documentation of AT89C51RC2, that I can make one of 5 ports to generate PWM signal if I set properly some registers. Some things I don't understand. I don't know what PCA counter is and how ...
1
vote
1answer
98 views

Best way to compare value in register with constant assembly AVR

I am newbie in assembly and AVR, I wonder what is the best way to compare two values like in C ...
0
votes
3answers
61 views

How To use ANDWF in Microchip PIC18fxxxx Assembly Language

ASSEMBLY LANGUAGE MPLAB PIC18f2550 I am trying to "AND" 2 Variables "If Variable_1 = 0 AND Variable_2 = 1 then" "DO WHAT IS NEEDED." "End If" This below makes no sense used as a "AND" Logic ...
1
vote
2answers
88 views

8051 - After API call at 0xFFF0, instruction pointer is not returning to my program

With microprocessor ATmEL 89C51RC2 , when I prepare registers and ACC for API call and I call CALL 0xFFF0 instructions below the call are never executed. The ...
14
votes
12answers
4k views

Could you program a microcontroller without a computer?

Let's say you had a rather simple and small microcontroller and had no interfacing, no computer, no debugger, compiler, or assembler. Could you write your code in assembly, convert it (manually) to ...
-1
votes
1answer
210 views

Assembly Language / Assembly Instructions (HC12)

Starting at address $0800, CE 00 31 9E 00 2D 01 08 18 06 3F A7 Determine the assembly instructions and indicate the addressing mode of each instruction. CE 00 31 =====> ldx #$ 01 ;x <-- 0031 ...
2
votes
2answers
111 views

Range of MIPS j instruction

I understand that for MIPS-32, the first 4 bits of the address to jump to are taken from the first 4 bits of the address of j instruction, which means that we have a boundary of 2^28 bits around the ...
1
vote
1answer
60 views

Pic18F2550 Assembly xt_xt

I am trying to set up a Serial Port for a PIC18F2550 Microchip. I am using MPLAB. In the 18F2550TMPO.ASM Template the statement CONFIG FOSC = XT_XT ;XT oscillator, XT used by USB. I need to change ...
10
votes
5answers
3k views

Why use AutoCAD Electrical?

I'm an electronic & electrical engineering student in first year of university. I have had to use a few core programs as part of my course for programming and simulation software. However I came ...
0
votes
1answer
167 views

PIC18 inline asm problem: error (195) expression syntax

I'm building a bootloader firmware, and now I want a simple app (LED blinks) to test calling bootloader from application itself. I'm currently doing: ...
1
vote
1answer
125 views

AVR Attiy45 PWM Servo motor control in Assembly

I'm trying to contol a servo motor with attiny45 writing the code in assembler. I figured out how to set the timer in pwm mode and how to choose a needed prescaler. And with different OCR0A values i'm ...
0
votes
0answers
139 views

“Constant value required” while compiling asm inline with avr-gcc

I am trying to insert some assembler code into my C program for AVR MCU, but every time I compile it, I get an error message from gcc-as: "Error: constant value required". I've tried changing I/O ...
1
vote
1answer
605 views

PIC12F683 or PIC16F688 assembly or C blinking LED example with XC8 compiler, MPASM or gputils

Hello I am new to PIC programming and I finally have got my dev environment working, I downloaded the XC8 compiler from microchip and also as backup I downloaded the gputils assembler. I have not been ...
0
votes
2answers
73 views

Shift value to some point in binary number

I wonder if it is possible to do the following. For instance, I have a number 00001110. I am shifting it left. -> 00011100.... But the question is if it possible to start setting value in carry flag ...
1
vote
2answers
84 views

What is Pipeline Flushing in microprocessors

I am reading the book "Writing Operating System from Scratch" by Nick Blundell. In one of the chapters, it is explained how we make transition from 16bit mode to 32bit mode. It says that before moving ...
0
votes
4answers
101 views

What is the meaning of performing logical operations on two numbers?

If we are to consider two Boolean values, the logical operations on them make perfect sense. But what would it mean to perform AND/OR/XOR operation on two binary numbers? I am learning Assembly ...
2
votes
2answers
283 views

PIC16F690 Consecutive flashing LED's

I am having trouble writing the code for flashing 6 LED's from PORTC on the PIC16F690 microcontroller. The LED's should flash like the lights on a runway. With the code that I currently have the ...
2
votes
1answer
122 views

How does the CPU handle XCHG internally?

While designing my own 16-bit CPU I wonder how the register-register XCHG instruction is executed internally. From computer science I know the DLX which doesn't provide XCHG and therefore doesn't need ...
1
vote
1answer
173 views

PIC16F1933 Output pins not working

I am having problems with getting certain pins on my microcontroller (PIC16F1933) working as outputs. I have been simulating the code in Proteus Design Suite by Labcenter Electronics and it doesn't ...
0
votes
1answer
73 views

What other problems can be caused when using the JMP instruction to navigate through subroutines instead of using the instruction CALL/RETURN?

I've been creating a report on why the JUMP instruction shouldn't be used in the piece of code above and instead CALL/RETURN instructions should be used to navigate through the subroutines. I ...
1
vote
2answers
100 views

How is data allocated in an assembly language using the instruction set?

Consider the following excerpt of assembly code written for the Nios II embedded processor architecture: ...
0
votes
0answers
47 views

Need Some Help Using a GLCD on EasyAVRv7

I am trying to use a GLCD, a WDG0151-TMI-V#N00 on my EasyAVRv7 board and I realized that I might need some help. The MPU I have is an ATmega32. Problem is, nothing works. For example I can't even tell ...
1
vote
1answer
70 views

implementing direct addressing mode for a load instruction on a mips archtitecture

Given a Mips machine with 26 bit addresses and 32 bits data-paths, where the load instruction is as follows |OPT code|rs|rd|immediate| |6 bits |5 bits|5 bits|16 bits| The OPT code is the ...
4
votes
1answer
289 views

How to tell CCS debugger where to start?

I am just starting with MSP430 and Code Composer Studio (CCS). I want to make a pure-assembly project. At the moment, I have a "hello world" program that does nothing but light an LED on the ...