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 : PIC32 chips now back in stock....
Page 2 of 2 | |||||
Author | Message | ||||
Bleep Guru Joined: 09/01/2022 Location: United KingdomPosts: 509 |
Hi Volhout, In another thread you mentioned the ADC and how with a bit of averaging you can get quite good results. I was wondering what your preferd method is to get the best out of the Pico ADC? I'm currently measuring some small voltages, so I'm amplifying them, I'm then doing the following. Dim Float Iin(11),Volt(11),Iout(11) Dim Float filtIi(11),filtIo(11),filtV(11) Dim Integer y ADC open 166666, 3 'Stabalise jitter in the ADCs 'Take 12 readings, for the Iin, Iout and Volts find the median value 'Do this 12 times and then do the same again on those 12 values For y=0 To 11 ADC Start Iin(),Volt(),Iout() filtIi(y)=Math(median Iin()) filtIo(y)=Math(median Iout()) filtV(y)=Math(median Volt()) Next ' Filter out high and low readings again. raw(0)=Math(median filtIi()) raw(1)=Math(median filtIo()) raw(2)=Math(median filtV()) Using the built in median, I beleive should order the values then take the middle 2 and average them, because there is a even number of samples. This gives me reasonably good results and is fast, but I wondered if there was a better way? speed is not critical I'm only taking a sample per second, but I don't want the smoothing to swallow up too much time. I originally was taking a group of samples, finding the largest and smallest, removing them and then averaging the rest, all in BASIC, so did take a fair time, but this median method seems to give me much more stable results. Thanks for any input. Regards, Kevin. |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 6798 |
This might have been better in a new thread, really ... Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
Grogster Admin Group Joined: 31/12/2012 Location: New ZealandPosts: 9308 |
On the subject of before COVID vs after COVID prices, I see the HC12 modules as one module that has more then DOUBLED in price - for the authentic ones - now vs before. I used to get them for about $4.50 per unit direct from HC12, now the price is up to about $10 per piece. These are still the genuine article, so I continue to use them, but EXACTLY how much of ALL of these price rises across the board on everything from chips to food, is cos of inflation, and how much is cos of profiteering by companies and blaming it on inflation and the virus...... I bet LOTS of companies ARE using the virus excuse, to ramp up prices WAY beyond what is strictly a result of inflation due to the virus. But that's the world we live in now, and the days of cheap stuff seem to be over. Perhaps I am just being a cynic. Smoke makes things work. When the smoke gets out, it stops! |
||||
Quazee137 Guru Joined: 07/08/2016 Location: United StatesPosts: 571 |
Have a read https://www.inflation corporate america increased prices profits Also funny how after the top rich get tax breaks inflation starts to creep up followed by interest rate hikes that also benefits those that don't need to borrow. The trickle down never works as they find ways to keep the tax break money in their own pockets. Quazee137 How about the top 1% pay at least 10% of all their income. |
||||
Grogster Admin Group Joined: 31/12/2012 Location: New ZealandPosts: 9308 |
Thanks for the link - quite a disturbing read..... I had a feeling that blatant profiteering was at the heart of a good chunk of the high prices we are all now seeing. Smoke makes things work. When the smoke gets out, it stops! |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4246 |
Kevin, as Mick said, let's continue in another thread. But "Median" is not the correct way to measure more accurate. See: Median In think you should use "MATH(MEAN a())" Volhout Edited 2023-07-14 18:14 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
athlon1900 Regular Member Joined: 10/10/2019 Location: AustriaPosts: 48 |
Will be great , if these chips-family also being supported by MMBasic. Double flash (512K) , 64K Ram with 64/100 pin. Avaibile at DigiKey. PIC32MX170F512H-50I/PT PIC32MX170F512L-50I/PT PIC32MX270F512H-50I/PT PIC32MX270F512L-50I/PT PIC32MX570F512H-50I/PT PIC32MX570F512L-50I/PT |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 6798 |
Beware of Microchip offerings. Although they list a huge range it doesn't mean that they are all available - or, indeed, that they ever will be. The actual chips available are the ones that get ordered and are consequently stocked. All the others are *available to order*. It's important to only set your heart on chips that are listed as being in stock. :) Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9126 |
Why? If you want 64 or 100 pin MM+ and MMX both give more speed and more functionality |
||||
pwillard Senior Member Joined: 07/06/2022 Location: United StatesPosts: 292 |
I'm getting the impression that Microchip is done making DIP-packaged chips. |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 6798 |
That's quite possible. For some time now their main purpose has been for support of existing equipment. Through-hole components in general are getting more and more unpopular with OEMs because it costs more to produce and populate the PCBs that use them. A 100-pin through-hole DIL chip would be interesting. :) Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
Page 2 of 2 |
Print this page |