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 : Beta Testers Wanted
Page 24 of 26 | |||||
Author | Message | ||||
JohnL Senior Member Joined: 10/01/2014 Location: SeychellesPosts: 128 |
Question for Geoff I guess? I need to read more precise Analog inputs and a more precise external Analog Vref < AVdd. Pin 2 on MX150-28pin is designated as external +Vref. External +Vref can be selected through AD1CON2 bits 13-15 register. Is there anything to you knowledge that may cause issues in MMBasic by changing AD1CON2 bits 13-15 using Peek/Poke? bit 15-13 VCFG<2:0>: Voltage Reference Configuration bits VREFH VREFL 000 AVDD AVss 001 External VREF+ pin AVSS 010 AVDD External VREF- pin 011 External VREF+ pin External VREF- pin 1xx AVDD AVSSbit 15-13 VCFG<2:0>: Voltage Reference Configuration bits Thanks John |
||||
Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3196 |
Unfortunately that will not work. To reduce the power consumption (important when the chip is put to sleep) the ADC is turned off most of the time. It is only turned on when a measurement is about to be made (ie, the PIN() function) and also at that time the reference sources are set. So you can poke but it will be overruled when the measurement is made. I could build a custom version for you with pin 2 as Vref if you like. The issue is that I cannot keep rebuilding a special version every time I come out with a new release so you will be fixed at that version number. Geoff Geoff Graham - http://geoffg.net |
||||
MOBI Guru Joined: 02/12/2012 Location: AustraliaPosts: 819 |
I wonder if building an accurate and stable power supply for the uMite would be a solution. If it is for the uMite, it should be do-able, not sure if the on board PS of the Maxi would get in the way? David M. |
||||
bigmik Guru Joined: 20/06/2011 Location: AustraliaPosts: 2914 |
Gday John, A good power supply would be a must but could you read your accurate referrence in via analog in and adjust your inputs acordingly? For example.. Your referrence is exactly 2.5v but reading with the uMite you get 2.4v.. You could adjust the other analog inputs you read up by 0.1, or would it be a ratio of ( read voltage x 0.1/2.5 x 3.3).. I dont know for certain that it will work for you but it is worth a go. Regards, Mick Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<< |
||||
Grogster Admin Group Joined: 31/12/2012 Location: New ZealandPosts: 9308 |
By no means intending to hijack this thread on it's 39th page, but how are you these days, Mick? Smoke makes things work. When the smoke gets out, it stops! |
||||
bigmik Guru Joined: 20/06/2011 Location: AustraliaPosts: 2914 |
Doing really well thank you Groggy, Had two stents to fix two blockages and back and fully functional... New drug is slowing me down a bit too much but cardio side is all going strong.. Will discuss with the doc when i see him next month... Regards, Mick Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<< |
||||
Grogster Admin Group Joined: 31/12/2012 Location: New ZealandPosts: 9308 |
Excellent - nice to see you back around the forums again. Smoke makes things work. When the smoke gets out, it stops! |
||||
JohnL Senior Member Joined: 10/01/2014 Location: SeychellesPosts: 128 |
Thanks Geoff, Mobi and Mick. I have applications where precise/stable full 10 bit resolution would be useful for inputs less than 3.3v and the simplest I thought would be to use a typical precision external Vref. With a more precise/stable supply regulator, may not need a separate external precision Vref? Analog power and ground are also separate from digital supply and can be from 2.3V to 3.6V, will need to play with that. I like Micks idea about reading an accurate external Vref via one the analog inputs and use it as a calibration reference for other analog inputs. External I2C, 10-12 bit ADC is another option, good quality with faster conversion can be expensive. At the moment don't need more than 5 samples (conversions)/sec. I will play with other options before considering a custom version. Thanks very much for the offer Geoff. Good to hear that you are getting better Mick. Regards John |
||||
vasi Guru Joined: 23/03/2007 Location: RomaniaPosts: 1697 |
John, what if accepting the offer will help Geoff in Micromite development? Will you reconsider it? Hobbit name: Togo Toadfoot of Frogmorton Elvish name: Mablung Miriel Beyound Arduino Lang |
||||
JohnL Senior Member Joined: 10/01/2014 Location: SeychellesPosts: 128 |
Absolutely, but as Geoff has indicated that he can not provide ongoing support for this modification in future updates. I think it would probably be more appropriate to wait until micromite is fully released and becomes more stable. Hopefully after the next firmware release there won't be any significant bugs left, so far only very few bugs have been found. |
||||
atmega8 Guru Joined: 19/11/2013 Location: GermanyPosts: 722 |
Ok, i think "peeking and pokeing" is very interesting and challenging but keep in mind that this could destabilize mmbasic very easy. If you will be the "master of the beast", than use a compiler or Assembler... So i think in generall that this is not a good idea, although i asked in this thread for being able to do more with it before ( i have changed my mind about this). On the other side i would like to ask Geoff why peek and poke ist still a possible instruction? Also under the aspect that you are searching for every free bit in the PIC. The concept of mmbasic on a pic (for my understanding) is to provide an easy, robust and cheap Environment. But this also means that the System must be somewhat a closed shop(not in terms of not beeing able to dive in the sourcecode). If we need more accurancy, higher Resolution for ADC or any other, then i think there are enough Solutions and Chips on the market that can be connected via I2C, SPI, or just Serial protocols. For example a 1,50$ MICROCHIP - MCP3421A0T-E/CH - 18BIT ADC,4SPS,1CH,SOT23-6 http://www.farnell.com/datasheets/1669442.pdf Let's concentrate on the "Basics";-). Go further, faster... Greetings from Germany with sunny and spiderless 10-12 degrees temperature Dietmar |
||||
MOBI Guru Joined: 02/12/2012 Location: AustraliaPosts: 819 |
I did a post about a year ago using a PIC16F88 as an I2c slave running 7 channels of 10 bit ADC. At the moment, the control byte only contains the number of the adc channel and starts conversion. The Vref is set to VDD. There is no reason why the control byte could not be used to set up for internal Vref or external Vref. The i2c would allow at least 100 samples per second. If you are interested, I'm prepared to alter the firmware. Source code (assembly) and Hex code is available. I think we would lose one channel. Then there is the PIC16F1503 which is soic and 14 pin with 8 channels. All do-able David M. |
||||
JohnL Senior Member Joined: 10/01/2014 Location: SeychellesPosts: 128 |
1. External devices have always been the option. But that defeats the purpose where you have modern advanced microcontroller with these features already built in. 2. Don't know where you get your pricing $1.50 for MCP3421A0T-E/CH, possibly if you buy them in thousands. In qty 1-25 from Microchip direct they are $2.39 and it is 1 channel device, MCP3428 is 4 channels at $3.56 each. On top of this you need pcb and associated hardware which brings the cost to well over the cost of micromite MX150. |
||||
Grogster Admin Group Joined: 31/12/2012 Location: New ZealandPosts: 9308 |
FORTY FLIPPIN' PAGES OF THREAD! Simply WOW. Life begins at forty.... Smoke makes things work. When the smoke gets out, it stops! |
||||
JohnL Senior Member Joined: 10/01/2014 Location: SeychellesPosts: 128 |
I don't know if I should be posting this here, this thread is already getting very long and this post may not be exactly relevant to this thread. Anyway, Been playing a fair bit with RS485 UART serial ports lately on both Duinomite and Micromite. Micromite supports DE option on hardware UART com1 with baud rates up to 230400, GREAT! DE option is fantastic for half duplex RS485. Duinomite as far as I can tell in the 4.4B version only supports DE on COM1 software port that is limitted to 19200 baud. This is not an urgent requirement, but it would be nice if Duino could use DE on one of its faster hardware UARTS, to be more compatible with Micromite on higher speed RS485 network. On a separate note. Both Micromite and Duinomite Uart receive pins are floating (tri-state) when connected to RS485 transceiver in NON receive mode, and this is clearly seen on the scope with a fair bit of floating noise when not receiving data. This may not be a real issue, but I prefer to keep inputs clean and in known state by placing a pull up resistor (4.7K) on RS485 driver or Micromite/Duinomite Uart receive pin. |
||||
Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3196 |
After I have Finished with the Micromite I intend to retrofit a lot of its features into the Maximite/Duinomite/ColoutMM/etc. It won't be immediately but that is on the roadmap. Geoff Geoff Graham - http://geoffg.net |
||||
CircuitGizmos Guru Joined: 08/09/2011 Location: United StatesPosts: 1425 |
THAT is EXCELLENT to hear! Thank you Geoff! Micromites and Maximites! - Beginning Maximite |
||||
robert.rozee Guru Joined: 31/12/2012 Location: New ZealandPosts: 2350 |
minor typo in manual, page 12: "any input change (hi to low or lo to hi)." (inconsistent usage of lo/low) page 18: "uses the DS16B20 function" (should be 18, not 16) the above are just from a cursory glance at some bits of the manual. and a suggestion (if it is not already possible), allow for the LCD and KEYPAD commands to share pins. assuming the r1..r4 pins are driven when scanning the keyboard, there is no reason they can not be shared with the lcd as d4..d7. when the en pin of the lcd module is low these pins are ignored. this would save 4 pins. rob :-) |
||||
robert.rozee Guru Joined: 31/12/2012 Location: New ZealandPosts: 2350 |
page 54: "OPEN "COM1: 4800, 9BIT" as #1 PRINT "1" + CHR$(211); PRINT "0" + CHR$(23); PRINT "0" + CHR$(0);" shouldn't there be a #1 after each print? (print #1, "1" ...) page 57: "Similarly, I2CSEN is now I2C SLAVE WRITE, etc." is this not I2C SLAVE OPEN? rob :-) |
||||
kermess Regular Member Joined: 04/04/2013 Location: SpainPosts: 45 |
Good morning. I would like to participate in the beta testers. I have a programmer PICKIT3 and several pieces of PIC32MX150F128B. It is possible that I can provide sufficient documentation and software to get started. Regards And thank you very much. David PM |
||||
Page 24 of 26 |
Print this page |