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
0answers
13 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
41 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 ...
2
votes
0answers
47 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
58 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
38 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
24 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
45 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
84 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
65 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
76 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 ...
0
votes
1answer
57 views

Direct cache vs. associative cache

Trying to solve this problem where direct cache would outperform associative: Propose you have a cache with a line size of L 32-bit words, S number of sets, W ways, and addresses are made up of A ...
0
votes
1answer
87 views

5-stage pipelined implementation (RISC) of a microprocessor

I'm trying to solve two questions about a RISC 5-staged pipeline that is not exactly like MIPS found here (everything is included in this post). Consider the non-pipelined implementation of a simple ...
0
votes
1answer
61 views

ISA efficiency code compaction and memory traffic

I'm having issues understanding this problem and am new to ISA's. Here's a problem with 3 questions and my biggest question is, what is supposed to happen? Specifically, the HLL Code at the bottom. ...
1
vote
2answers
78 views

MSP430 Stack pointer and frame pointer behavior

While trying to analyze a simple Assembly file generated through the msp430-gcc, I stumbled upon a set of instructions that I don't understand dealing with the frame pointer and the MSP430's stack ...
0
votes
1answer
91 views

Numerical value in decimal of the 32-bit word stored at address 1000H

I'm a little confused how to tackle these three questions. Assuming two's complement arithmetic and operand alignment, give the numerical value in decimal of the 32-bit word stored at address 1000H ...
2
votes
0answers
65 views

What happens to AVR registers during multi-cycle instructions?

This is more of a theoretical question... (Also my first on Stack Overflow) I am wondering what happens to Atmel AVR microcontroller (i.e. ATTINY85) registers during a multi-cycle instruction. i.e. ...
1
vote
1answer
77 views

Assembly XMEGA program creating a longer than expected pin toggle?

I'm trying to do the fastest pin toggle possible on an XMEGA32E5 running at 32MHz. My code is as follows: ...
0
votes
2answers
62 views

Average Cycles Per Instruction

We have two different computers with the same instruction set. There are three classes of instructions (A, B, and C) in the instruction set. Computer M1 has a clock rate of 80 MHz and Computer M2 has ...
5
votes
3answers
884 views

Is this a correct way to have a 1 second delay?

If I have a PIC24 with a 4 MHz frequency. Is it accurate to have a 1 second delay by having 4 million clock cycles? I made a 1 second delay like this on my PIC24FJ128GA010: ...
1
vote
1answer
125 views

The PIC24F RETURN instruction

The PIC model I have is PIC24FJ128GA010. My question how many clock cycles does the RETURN instruction consume? The datasheet says 3(2), what does that mean?
2
votes
2answers
163 views

AVR microcontrollers, who initilizes assembly `data` segment and what is the purpose to have this directive?

I am new to assembly and microcontrollers and am trying to figure out how they work. Now, I have read a lot how in assembly text and ...
2
votes
0answers
146 views

32-bit unsigned binary integer to 8-bit BCD in AVR ASM for ATtiny. How to make it more efficient?

I wrote a program in AVR ASM for converting 32-bit unsigned binary numbers to 8 digit ...
1
vote
2answers
149 views

ATtiny2313 vs ATtiny84 software compatibility

I make and sell a variant of the USBtiny AVR programmer. It uses an ATtiny2313 clocked at 12 MHz and does bit-banged USB using hand-tuned assembly language (that someone else wrote - it's an open ...
3
votes
3answers
134 views

Frequently used functions, performance improvements using static variables?

Does defining variables (large arrays) as static inside a function have any performance improvements if the function is to be called repeatedly say in the order of seconds?
1
vote
0answers
84 views

Weird bug in MPLAB X IDE

When using the RTCC module in the PIC24F, we need to use the secondary oscillator (by setting bit #2 of OSCCONL register) and disable the write lock on the RTCC registers. Now the write lock can be ...
2
votes
1answer
140 views

Problem with the explorer 16 dev board

I have the explorer 16 dev board equipped with the PIC24FJ128GA010. I wrote a C code to write something on the LCD and a LED blinking after that. I wrote the same code in assembly and both codes work. ...
0
votes
1answer
95 views

pic18f instruction reference for XC8 Assembler

I found lots of tutorials online on PIC18 assembly programming, but i did not found any official document from microchip on PIC18 architecture and assembly programming. Can anybody share the link ?
1
vote
1answer
93 views

mpasm - overlapping variables in a udata directive

In MPASM it appears I can do this to make paylen_lo and bytesleft have the same memory location: ...
0
votes
0answers
179 views

Debug Assembly Code in Atmel Studio

I am using latest Atmel Studio to generate *.hex file from *.asm file. When I start to ...
1
vote
1answer
123 views

RSBMI instruction in ARM

as an exercise problem in ARM assembly program, I had to convert a number x to its absolute value. now seeing the problem as a simple problem of removing the sign of the respective number, I used BIC ...
0
votes
2answers
65 views

Avoiding multiple defines by using side effect of PIC banking

This is more a question of style than anything else and might strike some as a bad thing to do. If I have a serial port pin on RC4, say, I can make some defines to help out: ...
2
votes
1answer
183 views

PIC12 TRIS Register not setting, No GP0 GP2 output

I originally asked the this question on Stack Overflow. I think here would have been a better audience. I'm trying to program a PIC12C508A to do a simple LED learning circuit. I've read some ...
3
votes
2answers
257 views

Changing to relocatable code for PIC microcontrollers

I've come back to PIC programming after 10 years and I've been relearning everything. I'm looking at the section in the MPASM manual where it discusses relocatable code. And I've come to the ...
3
votes
1answer
175 views

avr-gcc timer overflow interrupt handler in inline assembly

My current project involves producing 200KHz PWM waveforms using timer 1 in fast PWM mode. I would like to increment a 16-bit counter every time the timer overflows (every 5μS) ...
2
votes
1answer
162 views

Number must be positive and less than 64

Im working with an ATMEGA328P, making a bit of USART code. I used asm linked with C, with no less than 7 building errors. All those were same "Number must be positive and less than 64". Yes, I have ...
2
votes
2answers
319 views

Tiny Code for dumping Flash Memory

I'm trying to write as tiny code as possible to extract the firmware of Infineon's XMC4500 microcontroller. The code must fit into a 30 byte buffer which allows me to have 15 machine instructions ...
2
votes
1answer
134 views

What's the issue in this LEDS blinking PIC18 ASM code?

I got to code the typical example of 8 LEDS turning ON and OFF, then all getting ON in a loop. I got a PIC 18F4550, and coded this: ...
1
vote
2answers
215 views

How to produce time delays in PIC18 ASM programming?

I'm a newbie with microcontrollers programming. I have a high level programming understanding but I'm getting involved in low lever CPU/Microcontrollers development. I want to do this simple exercise ...
1
vote
0answers
523 views

Obstacle detection using an ultrasonic sensor and a PIC microcontroller

I'm trying to detect obstacles at a specific distance using an ultrasonic sensor which is interfaced with a PIC micro controller. Ultrasonic sensor = HC-SR04 PIC micro controller = PIC16F628A ...
5
votes
3answers
159 views

Dump Flash Memory through a single GPIO pin

I'm working with Infineon's XMC4500 Relax Kit and I'm trying to extract the firmware through a single GPIO pin. My very naive idea is to dump one bit at a time through the GPIO pin and somehow ...
4
votes
1answer
29 views

How can I achieve a third interrupt priority level on 8052?

Most standard 8052 platforms allow the user to configure interrupts to be of two possible priorities: higher, during which any pending interrupt must wait, and lower, which can be interrupted by the ...
3
votes
2answers
276 views

Could an ARM (ARM7TDMI) Branch instruction take 6 cycles?

I have found an ARM Branch instruction appears to take 6 cycles to run on an ARM7TDMI processor. It seems it shouldn't be happening because in all references I've found, an ARM7TDMI branch instruction ...
0
votes
1answer
160 views

Cortex M3 GPIO Interrupt won't trigger

I have set a pin on a Cortex M3 to act as an rising-edge triggered interrupt and it's not firing for some reason. What it should do is receive a 1Hz pulse, trigger an interrupt and start a 12.8Khz ...
0
votes
0answers
162 views

PIC Assembly: Place to set external interrupt

I'm using keyboard to take input and make some manipulations with 7-segment display and timer. Basically I'm trying to implement a countdown timer. I use keyboard for inputting time to be counted ...
1
vote
1answer
306 views

Practical issue with PIC PWM

I have written the following code to generate PWM and to change the duty cycle when a button is pressed. In simulations it works fine. However when actually implemented the circuit, the PWM starts ...
1
vote
1answer
237 views

How to use an interrupt on Cortex - M3

I am trying to set up the chip so it will detect a rising edge on a pin then start outputting a square wave on the next pin over after that. I have the interrupt turned on but I don't know how to say ...
2
votes
1answer
402 views

Moving SP and PC using inline assembly in MPS430-GCC

I am writing a simple task scheduler for my MSP430F5529 USB launchpad. I need to update stack pointer(SP), then enable interrupts and then update program counter (PC). But I am getting an error with ...
4
votes
3answers
522 views

Is there any difference between the assembly instructions of ARM MCUs from two different corporations?

I'm curious to know, are there any differences between the assembly instructions of ARM MCUs from two different corporation? For example between an Cortex-M3/4 of NXP and TI or ST or other ...
1
vote
1answer
352 views

Using USB to Parallel Port, Send an 8-bit data of Assembly Code [duplicate]

For educational purposes, our professors have DB25 ports on our laboratory rooms, and of course we can only simulate our assembly codes in there Our professor said that it might not be possible to ...
0
votes
1answer
178 views

How to understand initialization and stack checking of ARM assembly language [closed]

I am trying to understand How bad a 'void main(void)' is from the following link: tech notes. But I have difficulties in understanding two assembly languages examples, the first one is shown below: ...