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 Beta 10
Page 1 of 4 | |||||
Author | Message | ||||
atmega8 Guru Joined: 19/11/2013 Location: GermanyPosts: 722 |
Just loaded new Beta 10.. Till now no Bugs found. Will test further Options this Weekend. |
||||
robert.rozee Guru Joined: 31/12/2012 Location: New ZealandPosts: 2350 |
finally have real hardware working - what a hassle getting mplab to do the right things. by default it seems to keep host power turned off, and you need to go into 'advanced' mode to turn it on. as yet, i've not found a way to make this setting stick. mplab is also not 'netbook aware' (under winXP at least). it opens a window that is more than 600 pixels high, and the only way i could view the status results was to continually select all with ctrl-A, paste into notepad, and read the text at the end. anyways, as i have hinted at elsewhere, the mod operator in MMbasic returns incorrect results. X mod Y, where Y is a positive value, should always returns results between 0 and Y-1. it should _never_ return a negative result as far as i am aware. the results i see are: > ? (-1) mod 3 -1 i would expect the result to instead be 3. this is why my code solution for the rotary encoder (using the mod operator) always counted up! rob :-) |
||||
robert.rozee Guru Joined: 31/12/2012 Location: New ZealandPosts: 2350 |
addendum, see: http://en.wikipedia.org/wiki/Modulo_operation it does seem that various languages may interpret negative values for X and Y different. my own experience (as outlined in the previous post) is with pascal. the question is, does MMbasic consider X mod Y as an integer operator, or working on reals? |
||||
bigmik Guru Joined: 20/06/2011 Location: AustraliaPosts: 2914 |
Geoff, Minor clarification for the manual. Pin 20 (28pin) and Pin 7 (44pin) MicroMite connections the description says 47µF TANT CAPACITOR (+) TO GROUND I feel that is a bit confusing and maybe should be simply 47µF TANT CAPACITOR (+) with maybe pin 19/6 labelled 47µF TANT CAPACITOR (-)/GROUND Regards, Mick Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<< |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 6101 |
I program in Liberty Basic and PureBasic. Both give the same results as MMbasic. It is a bit like INT, there is no one method used. Jim VK7JH MMedit  MMBasic Help |
||||
robert.rozee Guru Joined: 31/12/2012 Location: New ZealandPosts: 2350 |
the original GWbasic also agrees with MMbasic, so i guess i must bite my tongue. although excel and python do produce the results i expected - from brython (http://www.brython.info/tests/console.html) i get the result: Brython 2.0 [0] on Netscape 5.0 (Windows)
>>> (-1) % 4 3 >>> the MOD operator can be persuaded to always return a 'clock arithmetic' result simply by adding a suitably large positive offset (that is a multiple of the divisor) to the dividend, so from a coding perspective it is easy to get around the problems with negative dividends. |
||||
jman Guru Joined: 12/06/2011 Location: New ZealandPosts: 711 |
@Geoff One thing I really miss is the ability to press the up arrow to recall the last typed command Regards Jman |
||||
Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3196 |
Yes, I miss the command line editing also. I will see how much flash is left after all the features have been added/stabilised and see if it can be fitted back in. Geoff Geoff Graham - http://geoffg.net |
||||
Lou Senior Member Joined: 01/02/2014 Location: United StatesPosts: 229 |
Geoff, Testing beta 10 here with Zonker, no problems found so far. Would it be feasible to add a complimentary output to one or both PWM channels ?? I have need for that feature. I am doing it now by feeding the PWM output into an interrupt both input pin, complementing the level and outputting that on another pin. Doing it that way there is a lot of jitter and increasing latency time as the freq goes up, and it overruns the interrupts around 500Hz. If possible that feature would be a great help to me. Zonker says to use an inverter but it would be nice to keep it on the uMite chip. Thanks, Lou Microcontrollers - the other white meat |
||||
MicroBlocks Guru Joined: 12/05/2012 Location: ThailandPosts: 2209 |
Lou there are five! PWM capable outputs. I think it was introduced from beta 7. Microblocks. Build with logic. |
||||
Frank N. Furter Guru Joined: 28/05/2012 Location: GermanyPosts: 831 |
Yeah! And this five PWM outputs are working with independent duty cycle very well!!! Frank |
||||
Lou Senior Member Joined: 01/02/2014 Location: United StatesPosts: 229 |
TZ, Frank, I tried the five PWM's setup in two channels but they are all in phase. I need an output with a 50/50 duty cycle and an inverted output 180 degrees out of phase with a 50/50 duty cycle. Why do something in hardware with an inverter if it's (hopefully) easy to do in software. It might be easy to setup in a command like PWM 1, freq, 1A, 1B, 1X for the inverted output. Maybe even do it for both channels. If it uses too much resources to do in software I can use an inverter but it doesn't hurt to ask. Only Geoff knows. Thanks for the help guys, Lou Microcontrollers - the other white meat |
||||
atmega8 Guru Joined: 19/11/2013 Location: GermanyPosts: 722 |
just use a Transistor to invert it.... |
||||
Frank N. Furter Guru Joined: 28/05/2012 Location: GermanyPosts: 831 |
Hi Lou, PWM1 and PWM2 are totally independent but I don't know if they are in phase when you use the same frequency... I think that using a inverter or a transistor (like Atmega8) recommended should be a possibility for you... Frank |
||||
OA47 Guru Joined: 11/04/2012 Location: AustraliaPosts: 926 |
Should I find variations from the analog input readings and one wire port when I drop the clock speed? Or is my regulator varying slightly with less load? |
||||
jman Guru Joined: 12/06/2011 Location: New ZealandPosts: 711 |
A better way to do it is to take 10 or 20 readings then divide by the same. Try this and post the result Regards Jman |
||||
OA47 Guru Joined: 11/04/2012 Location: AustraliaPosts: 926 |
Jman, the results are very consistent at any speed. It is that the one wire temperature goes from 28 deg @ 48Mhz and reads -2.93 @ 5Mhz. An analog voltage reading goes from 12V to 18v over the same freq change. |
||||
Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3196 |
No, sorry. The output compare (PWM) hardware in the PIC32 does not make that easy to do and it would add a heap of complications for something that could be solved with an inverter. Geoff Geoff Graham - http://geoffg.net |
||||
Lou Senior Member Joined: 01/02/2014 Location: United StatesPosts: 229 |
Geoff, Thanks for looking at it, an inverter it is. Lou Microcontrollers - the other white meat |
||||
robert.rozee Guru Joined: 31/12/2012 Location: New ZealandPosts: 2350 |
against my better judgement, can i request a couple of features :-) 1. the means for an interrupt service routine to tell what action called it. in some applications, one isr may be able to service interrupts generated by (in particular) several different pins. as far as i can see, there is currently no way for the isr to tell what the source of the interrupt was. a simple solution would be to introduce a variable called MM.INTPIN that is set to the number of the pin that generates an interrupt, with perhaps the polarity of the signal on the pin indicated in the sign of MM.INTPIN (+ve = high, -ve = low, 0 = non-pin generated interrupt). 2. please, please, please add the following functions: ASIN ACOS ATAN (as an alias for ATN). for anyone wanting to do any trig functions this saves a load of messing around with trig identities. rob :-) |
||||
Page 1 of 4 |
Print this page |