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)

0
votes
1answer
36 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
74 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
48 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
32 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
39 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
76 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
22 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
31 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
25 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
60 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: ...
0
votes
1answer
39 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
58 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
75 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
38 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
71 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
40 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
54 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
42 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.
0
votes
1answer
55 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
71 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
57 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
75 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 ...
0
votes
1answer
199 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
104 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
54 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
2k 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
131 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
117 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
127 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
511 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
71 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
95 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
215 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
108 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
157 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
96 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
68 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 ...
3
votes
0answers
220 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 ...
2
votes
3answers
105 views

Curious how does ALU addressing work like in Assembly code?

When writing assembly code, say R1 = R2 + R3, it is pretty easy to understand the addressing procedure because all registers are close to the ALU. But I find it hard to see how does the ALU go to the ...
2
votes
1answer
79 views

AVR Assembler Labels

According to doc1022, p. 17 (AVR Assembler User Guide): User defined labels which are given the value of the location counter at the place they appear. My question is, what goes into the opcode ...
0
votes
1answer
236 views

Use of $at register in MIPS?

Register r1 or $at, is it's sole use in pseudoinstructions? If so, is this the sole solution to enable pseudoinstructions within the architecture?
0
votes
1answer
165 views

8080 assembly comparing which of the numbers is greater etc

In my 8080 assembly project I need to check if user entered digits and if so do some stuff on it, otherwise display some error and close app. Normally i would do it like that ...
0
votes
1answer
280 views

XMega bootloader - How to make use of the functions in assembly source file

Its been two days I'm trying to write a Bootloader for ATXMega32E5. The Atmel studio doesn't have boot.h header file supporting XMega. As a result of searching and ...
2
votes
0answers
129 views

PIC12F ADC conversion has an unwanted offset

The current setup is shown below. PIC12F1822 with a 10-bit ADC. I'm using a 250R 0.05% precision resistor to get a nice 0-5V input to the analogue pin (AN2 if it matters). As far as I can tell I ...
0
votes
1answer
123 views

How to calculate cache size?

A cache with a line size of L 32-bit words, S number of sets, W ways, and addresses are made up of A bits. Assume that the cache is word addressed, i.e., the low two bits of the address are ...