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 KingdomPosts: 676 |
@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 KingdomPosts: 676 |
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: GermanyPosts: 712 |
@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: GermanyPosts: 1141 |
@atmega that would be more than I need. Danke! :) In fact, I've never tried. Michael |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 8605 |
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 KingdomPosts: 3678 |
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: GermanyPosts: 712 |
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 KingdomPosts: 3678 |
Wow, 3 weeks. I've waited nearly 8 weeks already. John |
||||
twofingers Guru Joined: 02/06/2014 Location: GermanyPosts: 1141 |
@atmega that (RS) helped a lot. Better than google! Michael |
||||
atmega8 Guru Joined: 19/11/2013 Location: GermanyPosts: 712 |
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: GermanyPosts: 1141 |
@atmega 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 StatesPosts: 172 |
Peter, I'm looking forward to this.. Thanks Jeff My Propeller/Micromite mini-computer project. |
||||
OA47 Guru Joined: 11/04/2012 Location: AustraliaPosts: 911 |
@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 KingdomPosts: 676 |
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: GermanyPosts: 1141 |
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: AustraliaPosts: 118 |
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 KingdomPosts: 676 |
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 KingdomPosts: 676 |
Keith Excellent News ! Thanks for the report. Sleep well Peter The only Konstant is Change |
||||
atmega8 Guru Joined: 19/11/2013 Location: GermanyPosts: 712 |
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 KingdomPosts: 676 |
Thank you DS ! Really appreciate your kind words Peter The only Konstant is Change |
||||
Page 2 of 8 |
Print this page |