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
24 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
68 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
47 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
67 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
124 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 ...
2
votes
1answer
43 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
91 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
263 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
98 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
97 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 ...
0
votes
0answers
95 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
91 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
27 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
201 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
0answers
85 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
74 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
111 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
112 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
183 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
461 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
197 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
137 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: ...
2
votes
1answer
136 views

ATmega2560 assembly pin read and compare logic problem

I apologize if my question was vague. Program: Atmel Studio 6 I am trying to make a program that enters an loop which it will only break out of when a pin goes low. ...
2
votes
1answer
100 views

IAR EWARM gives error on everything in startup_stm32

I'm trying to compile a project for school, which all my fellow classmates have no trouble compiling. This assignment is nothing more than dragging already written source code and compiling an, ...
0
votes
1answer
172 views

Force Cortex-M3/4 reset from assembly

I would like to force my STM32F4 to reset on fault, I tried to copy NVIC_SystemReset in assembly as : ...
1
vote
1answer
87 views

Processor directive in MPASM

I'm slightly confused about the processor directive in MPASM. Is it essentially the same thing as list? And what is the required value? If I take an example from the template file, f88temp.asm: ...
1
vote
3answers
100 views

How to force the shutdown of the PIC18 [closed]

I made a simple project, a "Hello World" test. The LED's light up, but when I turn the power off for the PIC18 they still stay on for a few seconds. I want to turn off the power to the PIC18 with no ...
0
votes
2answers
98 views

PIC 24F VGA array addressing instructions

In order to make a VGA driver for a PIC 24F microcontroller, I am generating an interrupt creating a VSYNC pulse, followed by a loop that puts data to the ports. HSYNC pulses are calculated after this ...
1
vote
0answers
223 views

Stellaris Launchpad: UART over GPIO PIN in ASM

I want to initialize and use UART on my LM4F120 Stellaris Launchpad in ASM. I found a reference code on how to to this on this ...
1
vote
0answers
83 views

AVR8 assign bit in assembly

I want to simply assign (copy) a bit in the IO register from some other register bit (or flag, or as a result of some comparison). Now I am using following (...
2
votes
1answer
101 views

Moisture Senstive Devices - Shelf Life

I have a bag of DAC7512N digital to analog converter from TI. They are still sealed in the original packing, however the caution notes denote "calculated shelf life in sealed bag: 24 months" and the ...
1
vote
1answer
379 views

Error: constant value required while compiling with avr-as in linux

Im trying to compile the following simple assembly program but there is a problem with the compiler that i cannot find its reason and fix it. So here is the code : ...
0
votes
1answer
187 views

Error in PORTB pic18f2550

I've read most of the datasheet, but have not found a solution. Why is PORTB on my PIC18F2550 only accepting a maximum value 3? My code is: ...
3
votes
3answers
317 views

AVR and bootloaders - where to begin?

I have the need to write a bootloader program on an AVR microcontroller (Atmega32) in order to enable self-programming. I have read various resources on the topic of bootloaders and have come to the ...
0
votes
2answers
127 views

Programming microcontrollers in ASM or C & how it's done

Just to clarify on these topics: If I were to program a microcontroller in ASM I would use an assembler, of course. The assembler would compile the code into opcodes (machine code?)(generally 1:1 ...
15
votes
3answers
763 views

From C to Assembly

Suppose that we have the following piece of C code for an avr-8bit: int v1=1; int v2=2; v2=v2+v1; I expected the following disassemble ...
1
vote
1answer
645 views

How to set all flags in 8085?

My Microprocessor teacher of 8085 gave an assignment to set all flags ! I have written this little program to set all except Sign, Please help me out ...
6
votes
1answer
1k views

What actually is a shadow register?

I noticed the term Shadow Register while going through a datasheet of a TMS320F28335 DSP. What does it actually mean? Does it have a physical location in the CPU as ...
0
votes
1answer
97 views

AVR: ASM multiplication label with 2

In the example below: ldi ZL, low(2*label) ldi ZH, high(2*label) label: .db "Hello world", 0 lpm Why multiplication label with 2 is needed? I understand that ...
4
votes
3answers
578 views

How can the number of clock cycles required to complete an instruction in a pipelined processor less than pipeline latency?

I am not new to computer architecture but I have only academic experience with micro-architecture implementation. I have heard and read this many times but never really bothered to understand the ...
6
votes
2answers
243 views

Removing rosin flux residue from PCB

I have a nice looking purple PCB from Laen's batch service, which I have assembled using rosin flux. I have cleaned the board as best I can with isopropyl alcohol, which gets rid of the tackiness of ...
0
votes
3answers
400 views

Cortex M3 delay 1us

Im trying to achieve 1us delay to be able to drive 1-wire bus. My proc is working on 10Mhz PCLK so I tried to use timer function with overflow on 10th cycle. For some reason it gives me resolution of ...
1
vote
3answers
276 views

Is it true that copying is the most CPU intensive operation?

A mech engineer said that copying puts more load on the microprocessor than "other" operations (e.g. moving data or creating the same amount of new data). Is this true? Can you elaborate? I understand ...
-1
votes
2answers
221 views

Understanding timers

I'm studying timers for use in scheduling and embedded systems but I don't understand the detail, does the time count upwards or downwards? Is the timer like a hardware timer like the ones we learnt ...
0
votes
1answer
109 views

Beginner resources device design/assembly [closed]

During the summer I would love to get into electrical engineering. As background, I'm a computer scientist and as such, I have a fairly decent grasp of basic circuit design and electricity, which ...
5
votes
3answers
1k views

Fastest way to toggle a bit in ASM

What's the fastest way to toggle a bit1 in MPASM for the 14-bit enhanced instruction set? (I'm working with a PIC16F1829) The code has to be standalone - I mean that it can be called on any moment, ...
2
votes
1answer
681 views

MPLAB assembly issue code jumps

I am having some issues with what I think to be good code. This is for a uni assignment but this is not the code I'm submitting. This is a test file to understand how it all works. Some of this code ...
0
votes
1answer
139 views

Calling ports in C on my microcontroller

I have been developing a small OS for my lpc1313fbd48. I am sending all of the C and assembly code in a binary file. I want to be able to call the ports in C and have an LED turn on for a few seconds ...
3
votes
1answer
569 views

PIC interrupt based soft UART timing trouble

I've tried to implement a software UART on a PIC18F452 using TIMER0 interrupts and I can't get the timing working. I'm using MPLAB ASM for compilation and the PICkit2 for programming. ...
4
votes
1answer
323 views

Atmel AVR assembly language multiplying by 2

I'm trying to multiply a 32-bit unsigned number by 2 across registers r18, 19, 20 and ...