Sonsivri

Electronics => Projects => Topic started by: Vineyards on January 02, 2014, 11:24:52 11:24



Title: Replies to zuisti's solutions - Post Here keep Main Topic Clean
Post by: Vineyards on January 02, 2014, 11:24:52 11:24
Zuisti you have always been a very helpful member. Of course, your knowledge and experience make this possible.
I am mostly working with Pic18 series and have to write hefty code. I am virtually ignorant when it comes to ASM.
Does PIC18 series require a lot of alteration in your code? Do you have to rewrite the whole thing if you want to adapt it to another PIC version in the same family?


Title: MikroC for PIC using Proteus (Feed Back & Responce)
Post by: Ichan on January 02, 2014, 03:45:57 15:45
I would like to comment, but:

1. I do not use MikroC
2. I can't see the code as it is in library form
3. I have no proteus installed on my pc anymore

The only comment is from the description: isn't that more common to convert numbers to string then kicking it out by a kind of string out function?

-ichan


Title: MikroC for PIC using Proteus (Feed Back & Responce)
Post by: Ichan on January 02, 2014, 07:32:18 19:32
Hi Zuisti,

I have no negative intention on my previous post.

Your works are great, i was trying to say that i think you may not get many feedback as there are only small audience for it, people may download it but then says "it's not for me".

Many people (me for sure) will choose the easy ways to use more common approach, while moving to a larger capacity and more powerful  mcu is dirt cheap these days.

Cheers.

-ichan


Title: 2 VU modules - MikroC for PIC using Proteus (zuisti's solutions)
Post by: folkeu on October 13, 2017, 09:46:06 21:46
Hello Zuisti,
I was one of 17 to download the latest project.
I want to make a return on your work.
I am very interested to start from your solution 2x16 leds to 2x10 leds.
I use a small homemade meter of 10 leds made from comparators. Why 10 leds? Simply because it is possible to vertically insert the module into a 19-inch 2U rack to view the input audio signal.
With a comparator system, I do not have peak hold.
So I want to try this adaptation because I am not used to programming. It will be a first for me!
I inserted the picture of the Input-Output part with the 2 VU modules of a 2U rack.
Very thanks


Title: 2 VU modules - MikroC for PIC using Proteus (zuisti's solutions)
Post by: zuisti on October 14, 2017, 12:31:42 00:31
I am very interested to start from your solution 2x16 leds to 2x10 leds. (VU meter)
I use a small homemade meter of 10 leds made from comparators.
Why 10 leds? Simply because it is possible to vertically insert the module into a 19-inch 2U rack to view the input audio signal.
With a comparator system, I do not have peak hold.
So I want to try this adaptation
Hi folkeu;
If you know Proteus and the mikroC for PIC compiler, it's not that hard. Try it, send the result and we will help.
Just not here, please open a new thread for this.
Use (modify) one of my 2x16 LED projects: shorter cycles are needed (not 0-15 but 0-9)
- Just an idea:
- if you are using smaller (3 mm) LEDs, my 16F88_LED project will be good for you (without modification).
Good luck!
zuisti


Title: Re: 2 VU modules - MikroC for PIC using Proteus (zuisti's solutions)
Post by: folkeu on October 16, 2017, 09:54:19 21:54
Hi zuisti,
I added my bargraph 10 leds in Proteus format.
You will see that the rectifier part is already ready.
The meter is almost designed in 3 dB steps in its comparator version.
I also added, the schematic and the PCB drawn under Sprint Layout.
Question: Is it possible to modify the MikroC library to integrate a step variable in dB for each interval between led?
Everyone can choose their viewing scale.
Folkeu



Title: Re: 2 VU modules - MikroC for PIC using Proteus (zuisti's solutions)
Post by: zuisti on October 17, 2017, 03:03:58 15:03
Hi folkeu;
First of all, thank you for opening a new thread.

I added my bargraph 10 leds in Proteus format
Nice and big work (from the years before the microcontrollers).

Quote
You will see that the rectifier part is already ready
Yes, I see. This is a very correct solution (built in twice), and in this case the VREF+ setting is also unnecessary. However, I would also like to try also the simple solution (as shown in the attached GIF), it also may be enough (and much cheaper). You can be 'play' with RC filter values,  by the VREF+ setting ...

Meanwhile I modified the 16F88_LED project and its DSN to use 2x10 leds (it was a few hours of work). If I understand well, you want to try to write the program (and modify the DSN) yourself, so I'm not sending the new 16F88_2x10led project (yet). But I attach the circuit's GIF image, hopefully it will help a bit.

Quote
Is it possible to modify the MikroC library to integrate a step variable in dB for each interval between led? Everyone can choose their viewing scale.
Yes, it is possible (like almost everything in C), but I do not recommend this solution. It would greatly increase the code size and slow down the program (runtime float calculations, etc). Instead, I prefer the using of a (freely modifiable) constant array containing the AD output values for all LED positions. The values can be calculated using the wanted dB steps. The corresponding program segment of my new project:
Code:
// 10-stage log table, 3 dB/step, can be (must be?) modified :-)
const unsigned LogTable10[] =
  { 45,  64,  90, 127, 180, 255, 361, 510, 721, 1020};
// -21  -18  -15  -12  -9   -6   -3    0   +3    +6     dB

However, by running the simulation, I found (I think so) that the 27 dB dynamics range is too small (if we keep the 10 LEDs and the 3dB/step). It should be at least 35 but rather 45 dB. In my program this is also achieved with the appropriate array values.
Note using your analog comparator variant this range is also too small (26 dB).

Greets,
zuisti


Title: Re: 2 VU modules - MikroC for PIC using Proteus (zuisti's solutions)
Post by: folkeu on October 17, 2017, 08:28:26 20:28
Hi zuisti,
I will have already made a mistake in the modification of your schema to adapt it to 10 leds. I have preserved LcL and RcL in their entirety and have kept only the first 2 leds of LcH and RcH.
I use this bargraph for years and I am visually accustomed to its low amplitude of dynamics in the display. I'm more interested in seeing what's going on around the 0dB.
This analog view is input to my compressor racks and audio limiter to protect an amplifier chain.
It is an indicator and not a precise measurement tool
On the other hand, I have a bragraph 36 points that it is also possible for me to insert in the audio chain to have more precision to a precise point.
Folkeu.


Title: Re: 2 VU modules - MikroC for PIC using Proteus (zuisti's solutions)
Post by: zuisti on October 17, 2017, 11:58:34 23:58
I will have already made a mistake in the modification of your schema to adapt it to 10 leds. I have preserved LcL and RcL in their entirety and have kept only the first 2 leds of LcH and RcH
In order to find the mistake, I need to examine the modified R_PosCalc, L_PosCalc  and Set_BarBits functions too.

  But ... I think it's simpler to attach the entire project I wrote  :).
This is a stand-alone project, it does not use anything from the "CommonFiles" folder, only the Wav file ("wav" folder) is needed in the DSN. Simply extract the attached RAR to the original "VUprojs" folder, that's all.
  Do not forget to restore the original content of the "CommonFiles" folder (if changed, my other projects are use it).

Quote
I use this bargraph for years and I am visually accustomed to its low amplitude of dynamics in the display. I'm more interested in seeing what's going on around the 0dB.
Ok, I understand.

zuisti


Title: MikroC for PIC (zuisti's solutions - Post Here keep Main Topic Clean)
Post by: towlerg on November 02, 2017, 11:12:57 23:12
Quote
Would you be interest for the source of my PIC18_MMD project?

I certainly would. Thanks in advance.


Title: MikroC for PIC using Proteus (zuisti's solutions - Follow & Responce)
Post by: PaulC on November 03, 2017, 11:48:59 11:48
- Would you be interest for the source of my PIC18_MMD project? This I've written a
long time ago (in 2012) yet in Proton BASIC. This link shows the features:
http://www.sonsivri.to/forum/index.php?topic=42842.0
If so, I will look in my archive ...

i very much would, helps the learning curve..


Title: Re: MikroC for PIC (zuisti's solutions - Post Here keep Main Topic Clean)
Post by: koky on November 03, 2017, 06:23:24 18:23
also i'm  interest
stupefacent project