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
35 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
49 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
54 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 ...
1
vote
1answer
71 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
399 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
92 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
98 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
88 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
54 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
131 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 : ...
0
votes
1answer
65 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
97 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
78 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
174 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
77 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
94 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
224 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
137 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
185 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
118 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
712 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
378 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 ...
4
votes
1answer
660 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
79 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
411 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
202 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
0answers
99 views

dsPIC30F external soubroutines

I'm having trouble migrating from a PIC18F device to a dsPIC30F (4013 in particular). I'm using MPLAB with ASM30 as compiler. So as the subject suggests the issue are extern subroutines - and by that ...
0
votes
3answers
261 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
244 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
178 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
98 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
537 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
136 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
432 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
283 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 ...
0
votes
0answers
41 views

Habing trouble booting code on an embedded SoC

I recently bought a freescale i.mx233 based OLinuXino-MICRO board to mess around with and give me some more power than the AVR uC's I've been doing abit with lately. However I'm having trouble getting ...
4
votes
3answers
885 views

Difference between reading PORT and PIN

What is the difference between reading PORTA and PINA? What is the relation between a port and its pins?I'm really confused!!! sample of reading PORT:(reading pin is not useful here) Assembly f=1MHZ ...
-3
votes
1answer
200 views

Is there a non-gas assembler for AVR for Linux? [closed]

I need to do an entire project in mostly-time critical code. Using assembly seems like a good idea. I've seen quite a few example assembly files and such which have an "Intel" feel to them. I know ...
2
votes
2answers
173 views

How can I control 8 LEDs with a timing delay with only one microcontroller (PIC12) written in Assembly?

I can have 5 I/O pins enabled. I'm just confused on how to control them individually.
0
votes
0answers
101 views

Interfacing with ROM chip(C, ASM, & Timing Diagrams)

I am attempting to interface with the following ROM chip via my mc9s12 microcontroller: http://www.alldatasheet.com/datasheet-pdf/pdf/55460/AMD/AM29F040B.html I have several functions written in C, ...
0
votes
1answer
2k views

How does the Store Word(SW) and Load Word(LW) instructions work, MIPS

The SW and LW instructions are defined as: ...
0
votes
1answer
141 views

Seeing how Instructions get Translated (Computer Architecture) [closed]

Little bit of a confusing question, also an x-post (Since it may be more suited here than SO). But anyways Im really looking for learning some low level programming. Thing is, Dev boards like ...
3
votes
1answer
301 views

Converting AVR assembly to machine code - addressing registers?

In AVR Assembly - I want to work out the machine code representation of the following: ANDI r18,$10 I know the opcode for ANDI is ...
0
votes
1answer
180 views

AVR programming and corresponding machine code

This is a question on a hand out, it asks: What is the machine code that corresponds to the AVR Assembly Language Instruction inc r22? Enter your answer as a 16 ...
4
votes
1answer
499 views

AVR assembly: Most fastest way to increment two combined bytes

What could be the fastest way to increment two combined bytes in assembler (assuming I'm working on a 8-bit CPU)? Currently I'm doing this: ...
0
votes
1answer
129 views

Writing a method using MIPS code

I am trying to understand how convert C code to MIPS code and I have having trouble understanding why the stack pointer( $sp ) needs to be manipulated before and after the procedural code.Isn't the ...
3
votes
1answer
178 views

PIC18 - problems getting inline assembler routine to work

(EDIT: Added C18 disassembly code) I need to optimize a function written in C for a PIC18f4585. I am using C18 to compile. The function I am trying to re-write in assembly is: ...
4
votes
1answer
249 views

What PIC processor was this HEX-file meant for?

I have this .hex file: ...
2
votes
2answers
345 views

Arduino linking assembler funtions

I would like to use (link) a function written in assembler in an Arduino project. What I want to do is: write the function in assembler using avr-gcc calling conventions declare the function as ...