Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
Tools
Old 21st June 2009, 01:58 PM   #31
Default

Quote:
Originally Posted by AtomSoft View Post
thanks it took some time but working. I dont see the benifit of using it unless writing in ASM lol
or if proteus supports axf / elf.
millwood is online now  
Old 21st June 2009, 04:47 PM   #32
Default

I heard of ARM AXF from somewhere but not sure...

what exactly is it?
AtomSoft is offline  
Old 22nd June 2009, 02:10 AM   #33
Default

This Luminary Micro evaluation board is both an evaluation board and a JTAG/SWD programmer/debugger for external projects. So for $59 you get both in one. Looks like it has an FTDI FT232 based JTAG built in.

Digi-Key - 726-1044-ND (Luminary Micro - EKK-LM3S811)
__________________
Mark Higgins
DirtyLude is online now  
Old 22nd June 2009, 11:16 AM   #34
Default

Jason, yes, labcenter does suggest that Proteus supports axf/elf file but I never saw any info on how that can be done.
millwood is online now  
Old 22nd June 2009, 03:17 PM   #35
Default

New uVision4 Beta available (unlimited usage)

Vision 4 Overview

Download link isnt working tho.

New link:
https://www.keil.com/demo/uvision4.asp

Quote:
UV4_BETA.EXE
is not available at this time.
Please check again later.
Comming real soon i guess

Last edited by AtomSoft; 22nd June 2009 at 03:18 PM.
AtomSoft is offline  
Old 22nd June 2009, 05:49 PM   #36
Default

jason:

try this - KEIL compilers and debug tools | Logic Technology

I am happy with mdk3.70 so I will stay where I am. let us know how uvision4 pans out.
millwood is online now  
Old 22nd June 2009, 06:46 PM   #37
Default

i lol i believe its just the IDE:

Quote:
The uVision4 Beta v3.0 may be installed as add-on to the following products:

Keil C51 Version 8.18
Keil C166 Version 6.18
Keil C251 Version 4.61
Keil MDK-ARM Version 3.70

Last edited by AtomSoft; 22nd June 2009 at 06:46 PM.
AtomSoft is offline  
Old 22nd June 2009, 06:58 PM   #38
Default

yes. you will still need the compiler / linker / assembler / etc (mdk) to get it to work.
millwood is online now  
Old 22nd June 2009, 07:09 PM   #39
Default

Lol i meant i have the :

Keil MDK-ARM Version 3.70

So a IDE update would be nice
AtomSoft is offline  
Old 22nd June 2009, 07:46 PM   #40
Default

Hey millwood how would you use 8 pins on a ARM for parallel data.

For example on a PIC you would:

LATA = 0x03;

How would i accomplish the same on a ARM, if for instance i want to use P0.0:P0.7
AtomSoft is offline  
Old 22nd June 2009, 09:19 PM   #41
Default

Jason:

two ways, depending on what chip you use.

1) set / clear the pins: for most arm chips, you don't have the pin by pin control you do on the pic. you will have to set or clear pins. IOSET = 0x0F (or its variants, depending on your chips again) for example would set the last 8 bits (0-7) high; and IOCLR = 0x0F will clear the last 8 bits. You obviously will need to configure PINSEL and IODIR registers (or their equivalent, again depending on the chip).

on some chips, you can use mask, or fast IO (FIOSET for example) to speed up the process.

2) bit-by-bit: there is available on Cortex (M3 at least and likely others). I am learning this right now so I may not be 100% correct. In Cortex M3, each register has an address and associated memory alias. You can thus define a word in the alias area to correspond to a bit on the register. Once you change the word in the alias area, the bit in the register would change - in theory anyway, . This will make programming bits almost identical to that on the pic.

Hope it helps.
millwood is online now  
Old 22nd June 2009, 09:28 PM   #42
Default

The ARM7's have a 32 pin wide port and have separate set and clear peripheral register, so if you wanted to set pins 0 to 7 with 0x03, you would have to clear all those pins first CLR_PORTA_REGISTER = 0x00FF, then set what you wanted, SET_PORTA_REGISTER = 0x0003.

It's a little confusing, because in order to clear a pin, you have to write a 1 to it's associated bit in the clear register.

With a port that's 32 pins wide, you don't need to fiddle around, if some of the pins you have are on one port or another, unless your running a 100pin chip, they are likely all to be on one PORT.

EDIT: I'd say I was ninja posted, but 9 minutes between post times, I guess I just had this page sitting here for a while.
__________________
Mark Higgins

Last edited by DirtyLude; 22nd June 2009 at 11:31 PM.
DirtyLude is online now  
Old 22nd June 2009, 09:43 PM   #43
Default

the fact that they use two instructions, IOSET to set and IOCLR to clear, to change a pin / port raises some interesting questions, especially for high-speed parallel IO.

say that you want to output i=0b10101010 on pin0...7, which has value now of 0b01010101. you will have to 1) set those 1 pins per i - now the port outputs 0b1111111, and 2) then clear those 0 pins per i - now the port outputs 0b10101010. so between step 1) and 2), there is actually an intermediate output (0b11111111 in our case) on the port where all the 1 pins in i has been set, but all the 0 pins in i retains their earlier state.

for 32-bit ports, the problem is even more complicated because you will have to read the port's value via IOPIN and then mask off those pins you don't want to change (pin8..31 in this case).

how do they solve this problem?
millwood is online now  
Old 22nd June 2009, 09:59 PM   #44
Default

You don't have to do anything with the other pins, 8 to 31 in this case. Setting a 0 in either the clear or set register essentially mean ignore those pins and they are untouched. You can see in my earlier example, which I screwed up a bit, setting 0x000F clears pin 0 thru 7 of PORTA, all other pins are untouched. Setting 0x0003 to PORTA, will set the pins that you want set. It has it's advantages and disadvantages.

Taking a quick look at the Stellaris Cortex-M3 datasheet, I'm dissappointed to see they chose to implement 8bit ports. They also do not have set and clear registers, but a GPIODATA register that works like the standard port register on most 8bits. They expanded its functionality with a mask register that allows you to specify which bits are actually updated with a write to the GPIODATA register.
__________________
Mark Higgins
DirtyLude is online now  
Old 22nd June 2009, 10:44 PM   #45
Default

yeah i was reading the datasheet. That is why they have :

IOSET = only sets does not clear
IOCLR = clear only no set.

i see... so do you think it would be easier to just make a function and pass it a variable like 0x03 and have it loop through the bits and set the pins as i wish?

Something like:
PORTA would be for me P0.0---to---P0.7
Code:
void ChangePortA(unsigned char NewVal){
if(NewVal & 0x01)
    IO0SET = 0x0000 0001 ;//P0.0 goes HIGH
else
    IOCLR = 0xFFFF FFFE    ;//P0.0 goes LOW

NewVal >>= 1;

if(NewVal & 0x01)
    IO0SET = 0x0000 0002 ;//P0.1 goes HIGH
else
    IOCLR = 0xFFFF FFFD    ;//P0.1 goes LOW
..............
.............
..........
}
or in binary
Code:
void ChangePortA(unsigned char NewVal){
if(NewVal & 0x01)
    IO0SET = 0b00000000000000000000000000000001;  //P0.0 goes HIGH
else
    IOCLR =   0b11111111111111111111111111111110;  //P0.0 goes LOW

NewVal >>= 1;

if(NewVal & 0x01)
    IO0SET = 0b00000000000000000000000000000010;  //P0.1 goes HIGH
else
    IOCLR =   0b11111111111111111111111111111101;  //P0.1 goes LOW

NewVal >>= 1;

if(NewVal & 0x01)
    IO0SET = 0b00000000000000000000000000000100;  //P0.2 goes HIGH
else
    IOCLR =   0b11111111111111111111111111111011;  //P0.2 goes LOW
.............
..........
}
Im trying to make my own PORT basically

Last edited by AtomSoft; 22nd June 2009 at 10:50 PM.
AtomSoft is offline  
Reply

Tags
arm, cortex

Thread Tools
Display Modes


Similar
Title Starter Forum Replies Latest
ARM Cortex Microcontrollers? dknguyen Micro Controllers 0 10th February 2009 12:37 AM
ARM Cortex-M3 DSP dknguyen Micro Controllers 1 2nd February 2009 04:47 PM



All times are GMT. The time now is 02:51 AM.


Electronic Circuits  |  Learning Electronics
eXTReMe Tracker