Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 05:10 19 May 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Micromite MkII beta testers needed

     Page 2 of 8    
Author Message
G8JCF

Guru

Joined: 15/05/2014
Location: United Kingdom
Posts: 676
Posted: 07:05am 27 Oct 2014
Copy link to clipboard 
Print this post

@KeithW

Re DDS Controller, Try this



OPTION Explicit

'
'DDS Calculation for AD9850
'(2^32)/CLKIN=Factor
'Tuning Word=Factor*Fout
'

DIM Factor%,Fout%,TW%,Billion%

Billion%=&h3B9ACA00

'Calculate Factor scaled up by 1E9 so that we can
'do all DDS arithmetic in Integers, 2^32 / 125,000,000 * 1,000,000,000 = 34359738368
Factor% = 34359738368

PRINT "Factor=";Factor%

'For an Fout of 10,000,000 Hz
'TW=34359738368 * 10,000,000 / 1,000,000,000 = 343597383.68 = 343597384 = &H147AE148

'Set Fout=10,000,000
Fout% = 10000000

'Calculate TW% without scaling
TW% = Fout% * Factor%
PRINT "Tuning Word before scaling ";TW%

'Add 500,000,000 because we're going to round by 1,000,000,000
'to ensure correct rounding
TW% = TW% + 500000000
PRINT "Tuning Word after adding 500,000 ";TW%

'Scale back TW% by 1,000,000,000
TW% = TW% \ Billion%

'For an Fout of 10,000,000 Hz
'TW=34359738368 * 10,000,000 / 1,000,000,000 = 343597383.68 = 343597384 = &H147AE148
PRINT "Tuning Word is ";TW%;" &H";HEX$(TW%)

'Now do performance testing

DIM I,L

L=TIMER
FOR I=1 TO 100
TW%=((Fout%*Factor%)+500000000)\Billion%
NEXT I

'Calculate elapsed time
L=TIMER-L

'Disp;lay time per DDS Tuning Word calculation.
PRINT "TW Calculate Time=";L/100;" mS"



The Tuning Word is calculated to EXACTLY the same accuracy & precision as a VB Double.

I'll be ditching the BCD library and rewriting my DDS code using INT64 vars.

Peter
The only Konstant is Change
 
G8JCF

Guru

Joined: 15/05/2014
Location: United Kingdom
Posts: 676
Posted: 07:07am 27 Oct 2014
Copy link to clipboard 
Print this post

If anybody is having trouble accessing/installing CFuncGen and/or using the CFunction Tutorial, please PM me

Peter
The only Konstant is Change
 
atmega8

Guru

Joined: 19/11/2013
Location: Germany
Posts: 712
Posted: 07:27am 27 Oct 2014
Copy link to clipboard 
Print this post

@Twofingers..
Microchip sends 3 samples for free ;-)


@ Geoff,
tested some I2C, SPI, 1 Wire, Encoder, Interrupts... programms..
So far no Problems.

MMedit Downloads also seem (feels) to be faster.....

Reading bandgap Voltage gives me 1.07xx (+- 0,02 Volts) Volt results.
VCC is stable 3,3 Volts.
Is this as expected?
 
twofingers
Guru

Joined: 02/06/2014
Location: Germany
Posts: 1141
Posted: 07:46am 27 Oct 2014
Copy link to clipboard 
Print this post

@atmega
  Quote  Microchip sends 3 samples for free

that would be more than I need. Danke! :)
In fact, I've never tried.

Michael
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8605
Posted: 09:41am 27 Oct 2014
Copy link to clipboard 
Print this post

Microchip quoted me 63 day delivery for samples:-(

However, RS in the UK now showing plenty of stock, part number 829-0576 at £2.885 each, minimum order 2

Best regards

Peter
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3678
Posted: 09:53am 27 Oct 2014
Copy link to clipboard 
Print this post

I'm still waiting for the samples I ordered weeks ago, no sign of a date.

If I'd realised they were so slow I wouldn't have bothered.

John
 
atmega8

Guru

Joined: 19/11/2013
Location: Germany
Posts: 712
Posted: 09:59am 27 Oct 2014
Copy link to clipboard 
Print this post

I had to wait 3 Weeks.

In Germany Farnell and RS have them in Stock.
Delivery within some days...
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3678
Posted: 10:54am 27 Oct 2014
Copy link to clipboard 
Print this post

Wow, 3 weeks. I've waited nearly 8 weeks already.

John
 
twofingers
Guru

Joined: 02/06/2014
Location: Germany
Posts: 1141
Posted: 10:55am 27 Oct 2014
Copy link to clipboard 
Print this post

@atmega

that (RS) helped a lot. Better than google!

MichaelEdited by twofingers 2014-10-28
 
atmega8

Guru

Joined: 19/11/2013
Location: Germany
Posts: 712
Posted: 11:18am 27 Oct 2014
Copy link to clipboard 
Print this post

  twofingers said   @atmega

that (RS) helped a lot. Better than google!

Michael


Just use the microchip sample order website.
Here you can choose who supplies the chips.

You can see the estimated Delivery time.
Have not payed one cent for my PIC controllers till now.
OF course i will pay and buy if i switch to mass Production;-)
 
twofingers
Guru

Joined: 02/06/2014
Location: Germany
Posts: 1141
Posted: 01:33pm 27 Oct 2014
Copy link to clipboard 
Print this post

@atmega

  Quote  Just use the microchip sample order website.


Thx! I think RS should be faster if I order there (2-3 days?).
Anyway, perhaps we should not continue to abuse Geoffs thread for shopping tips. ;)

Gute Nacht und danke!

Michael
 
Oldbitcollector

Senior Member

Joined: 16/05/2014
Location: United States
Posts: 172
Posted: 04:32pm 27 Oct 2014
Copy link to clipboard 
Print this post

  G8JCF said   @Keith W.

I have a version of MMProgRPC which only runs on 4.6 which programs 4.6 in about 13 minutes - needless to say it use CFunctions !!

I'll publish that version as soon as I get a chance

Peter


Peter,

I'm looking forward to this..

Thanks

Jeff

My Propeller/Micromite mini-computer project.
 
OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 911
Posted: 10:36pm 27 Oct 2014
Copy link to clipboard 
Print this post

@Geoff.
Not sure if this is a bug but the memory info is a bit strange:
> RUN
CURRENT UMITE VERSION 4.06
CPU SPEED SET TO 5 MHZ
Flash:
18K (29%) Program (703 lines)
0K ( 0%) 4 Saved Variables
42K (71%) Free

RAM:
773K (1446%) 18 Variables
0K ( 0%) General
4294966576K (-1346%) Free


Will have a look at my DIMs
GM
 
G8JCF

Guru

Joined: 15/05/2014
Location: United Kingdom
Posts: 676
Posted: 01:17am 28 Oct 2014
Copy link to clipboard 
Print this post

Keith, Jeff and others

The new MMProg32RPC which supports 4.6 is available for download from http://www.g8jcf.dyndns.org/mmbasicmkii

This version should also automatically detect and support the older 4.5 MMBasic release. But, if in doubt use the original MMProg32RPC from http://www.g8jcf.dyndns.org/mmbasic/MMProg32RPC.html to program 4.6 into a '170F first, and then use the new MMProg32RPC going forward.

Please give this version a try out and let me know how it goes.

73

Peter

The only Konstant is Change
 
twofingers
Guru

Joined: 02/06/2014
Location: Germany
Posts: 1141
Posted: 01:49am 28 Oct 2014
Copy link to clipboard 
Print this post

Hallo Peter,

I sincerely find these tutorials instructive, useful, and interesting!
It's more than I expected! Extraordinary good job! Thank you!

Michael
 
Keith W.
Senior Member

Joined: 09/10/2011
Location: Australia
Posts: 118
Posted: 02:38am 28 Oct 2014
Copy link to clipboard 
Print this post

Thank you Peter,

Chip programmed in 10:29 without fuss.
Now a very practical time.

Now for my bed.

Keith W.
 
G8JCF

Guru

Joined: 15/05/2014
Location: United Kingdom
Posts: 676
Posted: 05:10am 28 Oct 2014
Copy link to clipboard 
Print this post

Thank you Michael.

Always nice to know that one's work is appreciated.

Hopefully you will be releasing a CFunction or two or more in the very near future

Once again, very many thanks for the kind words.

Peter
The only Konstant is Change
 
G8JCF

Guru

Joined: 15/05/2014
Location: United Kingdom
Posts: 676
Posted: 05:11am 28 Oct 2014
Copy link to clipboard 
Print this post

Keith

Excellent News !

Thanks for the report.

Sleep well

Peter
The only Konstant is Change
 
atmega8

Guru

Joined: 19/11/2013
Location: Germany
Posts: 712
Posted: 06:50am 28 Oct 2014
Copy link to clipboard 
Print this post

Hi Peter,

great Job, really great!

Doesn't solve the Chicken Egg Problem, but fu.. for Chicken ;-)


DS
 
G8JCF

Guru

Joined: 15/05/2014
Location: United Kingdom
Posts: 676
Posted: 07:14am 28 Oct 2014
Copy link to clipboard 
Print this post

Thank you DS ! Really appreciate your kind words

Peter
The only Konstant is Change
 
     Page 2 of 8    
Print this page
© JAQ Software 2024