
hvontres
-
Content Count
58 -
Joined
-
Last visited
-
Days Won
3
Reputation Activity
-
hvontres got a reaction from larsie in How fast is the IO?
To get the CPU to 80 Mhz, you need to set the divisor to 2.5:
SysCtlClockSet(SYSCTL_SYSDIV_2_5 | SYSCTL_USE_PLL | SYSCTL_OSC_MAIN |SYSCTL_XTAL_16MHZ);
It looks like the default is 12.5 Mhz (see Table 5-4 in the datasheet)
-
hvontres reacted to SugarAddict in Need a thousand breadboard jumpers?
http://www.micro4you.com/store/jumper-wires-m/f.html -
hvontres got a reaction from bluehash in Quadcopter on the cheap!
I found another IMU on ebay, it's a little cheaper and the ad looked more promising (http://www.ebay.com/itm/-/160887031546?item=160887031546&ViewItem=&ssPageName=ADME:L:OC:US:3160)
-
hvontres got a reaction from abecedarian in Quadcopter on the cheap!
I think trying to get 4 Motors to stay in sync and to have the right throttle response might be a bit tough.... On the other hand, using a nitro-methane engine and a brushless motor as a Generator to drive 4 brushless motors might just be possible..... Not that I have ever considered such a crazy idea.....
-
hvontres reacted to abecedarian in Quadcopter on the cheap!
You people are distracting me!
I'm supposed to be learning these microcontrollers, and thinking about using the kit for my motorcycle... and here you are posting this?
Now I'm wondering how nitro-methane powered engines (used on small-medium sized model planes and hi-perf helos) would do with servo controlled throttles, accelerometers, GPS and such?
And why hasn't any done one of these ducted fan planes:
... or ...
And for good measure: a turbine powered RC helo:
http://www.stupidvid...C_Helicopter_1/
Is it possible to make a CAN controlled, fuel burning, quad copter?
-
hvontres got a reaction from larsie in I've got the power
Here is my solution:
I finally managed to find some time to build a box to house an old AT style power supply. I now have +/- 12V, +/- 5V and 3.3V supplies on the front banana plugs. I'll add some labels later.
Front View:
Back view:
-
hvontres got a reaction from zeke in Learning Python
One other thing to look into is using numpy/scipy for number crunching. I have been using that combo both for work and at home for a couple of years now.
-
hvontres got a reaction from EngIP in Oven control system (WIP)
If you want a more accurate calibration, just use mother nature: bath to ice-water ~0
-
hvontres got a reaction from geoper2 in PWM + UART
if you want to run PWM and a UART at the same time, you might want to look at the MSP430G2553 parts. You get a hardware UART and TWO timers to play with. They are currently out of stock, but you can get samples from TI.
-
hvontres got a reaction from RobG in Converting binary to decimal (BCD)
Here is a version modified for mspgcc. It uses a slightly different calling convention (args are put into R15:R12 from left to right)
I tested this on a MSP430G2231.
void binaryToASCIIScale(unsigned int n, unsigned char * digits, unsigned int scale); unsigned char s[5] = {0,0,0,0,0}; int data=1234; int sc=2; void main (void){ binaryToASCIIScale(data, s, sc); } void binaryToASCIIScale(unsigned int n, unsigned char * digits, unsigned int scale) { __asm(" clr R12"); __asm(" rla R15"); __asm(" rla R15"); __asm(" rla R15"); __asm(" rla R15"); __asm(" rla R15"); __asm(" dadd R12, R12"); __asm(" rla R15"); __asm(" dadd R12, R12"); __asm(" rla R15"); __asm(" dadd R12, R12"); __asm(" rla R15"); __asm(" dadd R12, R12"); __asm(" rla R15"); __asm(" dadd R12, R12"); __asm(" rla R15"); __asm(" dadd R12, R12"); __asm(" rla R15"); __asm(" dadd R12, R12"); __asm(" rla R15"); __asm(" dadd R12, R12"); __asm(" rla R15"); __asm(" dadd R12, R12"); __asm(" rla R15"); __asm(" dadd R12, R12"); __asm(" rla R15"); __asm(" dadd R12, R12"); __asm(" rla R15"); __asm(" dadd R12, R12"); __asm(" mov.b R12, 3(R14)"); __asm(" swpb R12"); __asm(" mov.b R12, 1(R14)"); __asm(" rra R12"); __asm(" rra R12"); __asm(" rra R12"); __asm(" rra R12"); __asm(" mov.b R12, 0(R14)"); __asm(" swpb R12"); __asm(" mov.b R12, 2(R14)"); __asm(" and #0x0F0F, 0(R14)"); __asm(" and #0x0F0F, 2(R14)"); __asm(" add.b #0x30, 3(R14)"); __asm(" tst.b 0(R14)"); __asm(" jnz l10"); __asm(" cmp #3, R13"); __asm(" jge l10"); __asm(" mov.b #0x20, 0(R14)"); __asm(" tst.b 1(R14)"); __asm(" jnz l20"); __asm(" cmp #2, R13"); __asm(" jge l20"); __asm(" mov.b #0x20, 1(R14)"); __asm(" tst.b 2(R14)"); __asm(" jnz l30"); __asm(" cmp #1, R13"); __asm(" jge l30"); __asm(" mov.b #0x20, 2(R14)"); __asm(" jmp l40"); __asm("l10:"); __asm(" add.b #0x30, 0(R14)"); __asm("l20:"); __asm(" add.b #0x30, 1(R14)"); __asm("l30:"); __asm(" add.b #0x30, 2(R14)"); __asm("l40:"); __asm(" tst R13"); __asm(" jz l80"); __asm(" dec R13"); __asm(" mov.b 3(R14), 4(R14)"); __asm(" tst R13"); __asm(" jnz l50"); __asm(" mov.b #0x2E, 3(R14)"); __asm(" jmp l90"); __asm("l50:"); __asm(" dec R13"); __asm(" mov.b 2(R14), 3(R14)"); __asm(" tst R13"); __asm(" jnz l60"); __asm(" mov.b #0x2E, 2(R14)"); __asm(" jmp l90"); __asm("l60:"); __asm(" dec R13"); __asm(" mov.b 1(R14), 2(R14)"); __asm(" tst R13"); __asm(" jnz l70"); __asm(" mov.b #0x2E, 1(R14)"); __asm(" jmp l90"); __asm("l70:"); __asm(" dec R13"); __asm(" mov.b 0(R14), 1(R14)"); __asm(" mov.b #0x2E, 0(R14)"); __asm(" jmp l90"); __asm("l80:"); __asm(" mov.b 3(R14), 4(R14)"); __asm(" mov.b 2(R14), 3(R14)"); __asm(" mov.b 1(R14), 2(R14)"); __asm(" mov.b 0(R14), 1(R14)"); __asm(" mov.b #0x20, 0(R14)"); __asm("l90:"); return; }
-
hvontres reacted to RobG in Converting binary to decimal (BCD)
To make my last function more usable, I have changed it a little bit and included scale.
This will be useful for example when sending ADC output to display.
The scale can be from 0-4 (anything >4 will be treated as 4.)
Here's how the output will look like on the display:
scale 0 scale 1 scale 2 scale 3 scale 4 1234 1234 123.4 12.34 1.234 .1234 567 567 56.7 5.67 0.567 .0567 89 89 8.9 0.89 0.089 .0089 1 1 0.1 0.01 0.001 .0001 0 0 0.0 0.00 0.000 .0000
void binaryToASCIIScale(unsigned int n, unsigned char * digits, unsigned int scale); unsigned char s[5] = {0,0,0,0,0}; binaryToASCIIScale(1234, s, 2); void binaryToASCIIScale(unsigned int n, unsigned char * digits, unsigned int scale) { __asm(" clr R15"); __asm(" rla R12"); __asm(" rla R12"); __asm(" rla R12"); __asm(" rla R12"); __asm(" rla R12"); __asm(" dadd R15, R15"); __asm(" rla R12"); __asm(" dadd R15, R15"); __asm(" rla R12"); __asm(" dadd R15, R15"); __asm(" rla R12"); __asm(" dadd R15, R15"); __asm(" rla R12"); __asm(" dadd R15, R15"); __asm(" rla R12"); __asm(" dadd R15, R15"); __asm(" rla R12"); __asm(" dadd R15, R15"); __asm(" rla R12"); __asm(" dadd R15, R15"); __asm(" rla R12"); __asm(" dadd R15, R15"); __asm(" rla R12"); __asm(" dadd R15, R15"); __asm(" rla R12"); __asm(" dadd R15, R15"); __asm(" rla R12"); __asm(" dadd R15, R15"); __asm(" mov.b R15, 3(R13)"); __asm(" swpb R15"); __asm(" mov.b R15, 1(R13)"); __asm(" rra R15"); __asm(" rra R15"); __asm(" rra R15"); __asm(" rra R15"); __asm(" mov.b R15, 0(R13)"); __asm(" swpb R15"); __asm(" mov.b R15, 2(R13)"); __asm(" and #0x0F0F, 0(R13)"); __asm(" and #0x0F0F, 2(R13)"); __asm(" add.b #0x30, 3(R13)"); __asm(" tst.b 0(R13)"); __asm(" jnz l10"); __asm(" cmp #3, R14"); __asm(" jge l10"); __asm(" mov.b #0x20, 0(R13)"); __asm(" tst.b 1(R13)"); __asm(" jnz l20"); __asm(" cmp #2, R14"); __asm(" jge l20"); __asm(" mov.b #0x20, 1(R13)"); __asm(" tst.b 2(R13)"); __asm(" jnz l30"); __asm(" cmp #1, R14"); __asm(" jge l30"); __asm(" mov.b #0x20, 2(R13)"); __asm(" jmp l40"); __asm("l10:"); __asm(" add.b #0x30, 0(R13)"); __asm("l20:"); __asm(" add.b #0x30, 1(R13)"); __asm("l30:"); __asm(" add.b #0x30, 2(R13)"); __asm("l40:"); __asm(" tst R14"); __asm(" jz l80"); __asm(" dec R14"); __asm(" mov.b 3(R13), 4(R13)"); __asm(" tst R14"); __asm(" jnz l50"); __asm(" mov.b #0x2E, 3(R13)"); __asm(" jmp l90"); __asm("l50:"); __asm(" dec R14"); __asm(" mov.b 2(R13), 3(R13)"); __asm(" tst R14"); __asm(" jnz l60"); __asm(" mov.b #0x2E, 2(R13)"); __asm(" jmp l90"); __asm("l60:"); __asm(" dec R14"); __asm(" mov.b 1(R13), 2(R13)"); __asm(" tst R14"); __asm(" jnz l70"); __asm(" mov.b #0x2E, 1(R13)"); __asm(" jmp l90"); __asm("l70:"); __asm(" dec R14"); __asm(" mov.b 0(R13), 1(R13)"); __asm(" mov.b #0x2E, 0(R13)"); __asm(" jmp l90"); __asm("l80:"); __asm(" mov.b 3(R13), 4(R13)"); __asm(" mov.b 2(R13), 3(R13)"); __asm(" mov.b 1(R13), 2(R13)"); __asm(" mov.b 0(R13), 1(R13)"); __asm(" mov.b #0x20, 0(R13)"); __asm("l90:"); return; }
And asm version of the above:
.global binaryToASCIIScale binaryToASCIIScale: clr R15 rla R12 rla R12 rla R12 rla R12 rla R12 dadd R15, R15 rla R12 dadd R15, R15 rla R12 dadd R15, R15 rla R12 dadd R15, R15 rla R12 dadd R15, R15 rla R12 dadd R15, R15 rla R12 dadd R15, R15 rla R12 dadd R15, R15 rla R12 dadd R15, R15 rla R12 dadd R15, R15 rla R12 dadd R15, R15 rla R12 dadd R15, R15 mov.b R15, 3(R13) swpb R15 mov.b R15, 1(R13) rra R15 rra R15 rra R15 rra R15 mov.b R15, 0(R13) swpb R15 mov.b R15, 2(R13) and #0x0F0F, 0(R13) and #0x0F0F, 2(R13) add.b #0x30, 3(R13) tst.b 0(R13) jnz l10 cmp #3, R14 jge l10 mov.b #0x20, 0(R13) tst.b 1(R13) jnz l20 cmp #2, R14 jge l20 mov.b #0x20, 1(R13) tst.b 2(R13) jnz l30 cmp #1, R14 jge l30 mov.b #0x20, 2(R13) jmp l40 l10: add.b #0x30, 0(R13) l20: add.b #0x30, 1(R13) l30: add.b #0x30, 2(R13 l40: tst R14 jz l80 dec R14 mov.b 3(R13), 4(R13) tst R14 jnz l50 mov.b #0x2E, 3(R13) jmp l90 l50: dec R14 mov.b 2(R13), 3(R13) tst R14 jnz l60 mov.b #0x2E, 2(R13) jmp l90 l60: dec R14 mov.b 1(R13), 2(R13) tst R14 jnz l70 mov.b #0x2E, 1(R13) jmp l90 l70: dec R14 mov.b 0(R13), 1(R13) mov.b #0x2E, 0(R13) jmp l90 l80: mov.b 3(R13), 4(R13) mov.b 2(R13), 3(R13) mov.b 1(R13), 2(R13) mov.b 0(R13), 1(R13) mov.b #0x20, 0(R13) l90: ret
-
hvontres reacted to Mac in Converting binary to decimal (BCD)
Just found a document from 2000, MSP430 Family Mixed-Signal Microcontroller Application Reports (slaa024.pdf), which seems to have a lot of the basic stuff I'm lookin' for (including that 16-bit to 5-digit binary-to-bcd routine). Yippee!
Regards, Mike
-
hvontres reacted to bluehash in Replying to Questions
Hello Everyone,
There has been a sudden influx of new members over the past month, resulting in many questions.
You guys are doing a great job at replying to questions, this is just to motivate you more:
If you see a question not answered for a day, with zero replies, try to answer it. If not, you may leave it alone. So far, you have had a very good record of answering questions. We could count 0 in the General forum. The posts that went unreplied were updates or ideas, not specifically needing a reply.
Another huge thing, which is very surprising, is that you guys have created a fantastic ecosystem. There is no mockery, good understanding as well as sharing of ideas - impressive- so much so that the new users love this forum( literally here and here). The only trouble makers are the darn spammers. The only come when we are asleep.
So big kudos to you and keep up the hard work.
-
hvontres got a reaction from bluehash in I've got the power
Here is my solution:
I finally managed to find some time to build a box to house an old AT style power supply. I now have +/- 12V, +/- 5V and 3.3V supplies on the front banana plugs. I'll add some labels later.
Front View:
Back view:
-
hvontres got a reaction from GeekDoc in Diy High-Speed 20:1 Scope Probe
A while back I came across this Website:
http://koti.mbnet.fi/jahonen/Electronics/DIY%201k%20probe/
It is essentially a 1K resistor attached to a piece of 50 Ohm Coax. The original author did some performance testing on his probes and they are quite impressive for the investment. The original design has a 21:1 attenuation (1050 ohm/50 Ohm)
I used two 470 Ohm resistors in Series to get closer to 20:1 (990 Ohm/50 ohm). One drawback of this probe design is that it needs to be terminated into 50 Ohms. My Tds 460A has a built in 50 Ohm termination. If your scope does not, you will also need an external 50 Ohm terminator for this to work correctly.
Here are the scope traces for a standard 350Mhz 10:1probe (Channel 2) and a "homebrew" 20:1 probe (channel 4). Both probes were looking at the same pin. The scope used is an old Tek TDS 460A and the Bandwidth was limited to 100Mhz.
On a 1Mhz clock, the 10:1 probe shows a little overshoot, but not much distortion.
On the 16 Mhz Clock signal, the 10:1 Probe shows significant distortion and overshoot due to it's capacitance. The 20:1 probe shows a nearly trapezoidal wave shape with no overshoot in the corners. I think a couple of these probes would be a useful addition to all of our toolboxes.
-
hvontres reacted to bluehash in FRAM Experimenter's Board coupon code 50% off
Just got this email from our TI representative:
(Thanks TI!)
-
hvontres got a reaction from hiatus138 in __delay_cycles on G2553 @ 16Mhz Problem
Ok, as promised, here are the scope traces for a standard 350Mhz 10:1probe (Channel 2) and a "homebrew" 20:1 probe (channel 4). Both probes were looking at the same pin. The scope used is an old Tek TDS 460A and the Bandwith was limited to 100Mhz.
On a 1Mhz clock, the 10:1 probe shows a little overshoot, but not much distortion.
On the 16 Mhz Clock signal, the 10:1 Probe shows significant distortion and overshoot due to it's capacitance. The 20:1 probe shows a nearly trapezoidal wave shape with no overshoot in the corners. I think a couple of these probes would be a useful addition to all of our toolboxes.
-
hvontres got a reaction from jsolarski in Diy High-Speed 20:1 Scope Probe
A while back I came across this Website:
http://koti.mbnet.fi/jahonen/Electronics/DIY%201k%20probe/
It is essentially a 1K resistor attached to a piece of 50 Ohm Coax. The original author did some performance testing on his probes and they are quite impressive for the investment. The original design has a 21:1 attenuation (1050 ohm/50 Ohm)
I used two 470 Ohm resistors in Series to get closer to 20:1 (990 Ohm/50 ohm). One drawback of this probe design is that it needs to be terminated into 50 Ohms. My Tds 460A has a built in 50 Ohm termination. If your scope does not, you will also need an external 50 Ohm terminator for this to work correctly.
Here are the scope traces for a standard 350Mhz 10:1probe (Channel 2) and a "homebrew" 20:1 probe (channel 4). Both probes were looking at the same pin. The scope used is an old Tek TDS 460A and the Bandwidth was limited to 100Mhz.
On a 1Mhz clock, the 10:1 probe shows a little overshoot, but not much distortion.
On the 16 Mhz Clock signal, the 10:1 Probe shows significant distortion and overshoot due to it's capacitance. The 20:1 probe shows a nearly trapezoidal wave shape with no overshoot in the corners. I think a couple of these probes would be a useful addition to all of our toolboxes.
-
hvontres got a reaction from RobG in Diy High-Speed 20:1 Scope Probe
A while back I came across this Website:
http://koti.mbnet.fi/jahonen/Electronics/DIY%201k%20probe/
It is essentially a 1K resistor attached to a piece of 50 Ohm Coax. The original author did some performance testing on his probes and they are quite impressive for the investment. The original design has a 21:1 attenuation (1050 ohm/50 Ohm)
I used two 470 Ohm resistors in Series to get closer to 20:1 (990 Ohm/50 ohm). One drawback of this probe design is that it needs to be terminated into 50 Ohms. My Tds 460A has a built in 50 Ohm termination. If your scope does not, you will also need an external 50 Ohm terminator for this to work correctly.
Here are the scope traces for a standard 350Mhz 10:1probe (Channel 2) and a "homebrew" 20:1 probe (channel 4). Both probes were looking at the same pin. The scope used is an old Tek TDS 460A and the Bandwidth was limited to 100Mhz.
On a 1Mhz clock, the 10:1 probe shows a little overshoot, but not much distortion.
On the 16 Mhz Clock signal, the 10:1 Probe shows significant distortion and overshoot due to it's capacitance. The 20:1 probe shows a nearly trapezoidal wave shape with no overshoot in the corners. I think a couple of these probes would be a useful addition to all of our toolboxes.
-
hvontres got a reaction from nuetron in __delay_cycles on G2553 @ 16Mhz Problem
Ok, as promised, here are the scope traces for a standard 350Mhz 10:1probe (Channel 2) and a "homebrew" 20:1 probe (channel 4). Both probes were looking at the same pin. The scope used is an old Tek TDS 460A and the Bandwith was limited to 100Mhz.
On a 1Mhz clock, the 10:1 probe shows a little overshoot, but not much distortion.
On the 16 Mhz Clock signal, the 10:1 Probe shows significant distortion and overshoot due to it's capacitance. The 20:1 probe shows a nearly trapezoidal wave shape with no overshoot in the corners. I think a couple of these probes would be a useful addition to all of our toolboxes.
-
hvontres got a reaction from RobG in __delay_cycles on G2553 @ 16Mhz Problem
Ok, as promised, here are the scope traces for a standard 350Mhz 10:1probe (Channel 2) and a "homebrew" 20:1 probe (channel 4). Both probes were looking at the same pin. The scope used is an old Tek TDS 460A and the Bandwith was limited to 100Mhz.
On a 1Mhz clock, the 10:1 probe shows a little overshoot, but not much distortion.
On the 16 Mhz Clock signal, the 10:1 Probe shows significant distortion and overshoot due to it's capacitance. The 20:1 probe shows a nearly trapezoidal wave shape with no overshoot in the corners. I think a couple of these probes would be a useful addition to all of our toolboxes.
-
hvontres reacted to bluehash in Private message spam
You may have noticed a PM from a spammer. We apologize for that. Private messaging has been now limited to 3 recipients(at a time) only and a 1 minute wait time between messages.
-
hvontres got a reaction from GeekDoc in MSP430G2xx2 Parts are coming :)
After you login to your account, hit the "Get Free Samples" button in this box: