brentru / 32to328ptranslator Goto Github PK
View Code? Open in Web Editor NEWExtendable shell script to translate ATMEGA32 code to ATMEGA328P code
License: GNU General Public License v3.0
Extendable shell script to translate ATMEGA32 code to ATMEGA328P code
License: GNU General Public License v3.0
while this does allow programs to compile successfully it does not assist in the translation of bits inside of registers. for example
ldi R16,0x0D
out TCCR0,R16
will translate to
ldi R16,0x0D
out TCCR0A,R16
unfortunately this wont work, for several reasons.
the above code would be better written as
LDI R16, (1<<WGM01) | (5 << CS00)
out TCCR0, R16
but in the 328p architecture WGM01 is not in TCCR0A it is in TCCR0B.
a fully functional converter or a student who should be doing the ECE263 HW, would know this and split the command into two load statements
LDI R16, (5<<CS00)
LDI R17, (1<<WGM01)
Thanks for looking into this,
Professor Viall
when converting between M32 and M328p assembly code it is important to realize that registers can change absolute position. this may move some registers from IO space to extended IO space. this means that some registers can no longer use the OUT/IN addressing modes and must instead use LDS/STS addressing modes.
this converter does not take that into account.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.