Wow!!!!!
That is cooool!!!!!!!
Wow!!!!!
That is cooool!!!!!!!
Dave
Always wear safety glasses while programming.
Assuming you have to measure max 18 volts, then you will need a resistor devider by 4 which will yield 4,5 volts to the ADC input. Assuming you will use a 10 bits convertion then:
45000/1024 = 44 (rounded)
Your 16 leds graphs = $FFFF >>( 16- ((ADC * 44 * 16)/45000))
Cheers
Al.
All progress began with an idea
thanks daryl, it does in fact work. I got tired last night and gave up on it and I think we were cross posting some how. Now all I have to do is tackle communications and Im done with this part of the project.
Btw: Whats that cool little program your using in your video?
Yeah, it was kind of late.
But like I said, I needed the practice.
The simulator is Proteus VSM from Labcenter Electronics.
Definately the coolest program I've ever had.
DT
Darrel,
I'm thinking of buying Proteus VSM. I know I should ask Labcenter, but since you use it with PBP, could I ask you a few questions?
All my schematic capture is in Altium (formerly Protel). Do you know if Proteus will import other formats? Altium will export in Orcad 8 format and a few others.
If I write a program in PBP, I assume that I have to feed Proteus the .ASM file in for the simulation. Is that true? I can't imagine that it would show me the PBP line it was executing during an animation. Just how easy is it to use in conjunction with PBP?
Charles Linquist
I don't think it can import files from any other programs.
There's nothing in the menu's, but I don't know if there are any external conversion programs.
With PBP 2.60A, you can work directly with your PBP code and it will single step through the program as it's simulating. The internal editor is terrible, but you can use MCS as an external editor. It doesn't use MCS to single step, but it's easier to write stuff.
You can also integrate it with MPLAB, and it will single step using the MPLAB IDE and watch variables, have breakpoints etc, but it reduces the screen space for the simulation.
For me, it's easier to compile programs like I always do with MCS, and just run the .HEX file in Proteus like I would on real hardware. No single stepping that way, but I don't need to single step anymore anyhow.
There's a demo version available.
It's doesn't let you create your own schematics, but there are a bunch of samples that you can write your own PBP code for. It's kind of like buying several development boards. You can't change the hardware, but you can write programs to run on them. And they're free.
I've saved so much money since I got it.
I don't buy chips and parts and breadboards and LCD's etc. anymore.
All my breadboards and electronics stuff are still in boxes after the move to Colorado. Just don't need them anymore.![]()
DT
I have so many unique situations that I don't know if Proteus would help. I have an unlimited number of development boards, but what is hard for me is simulation. I'm using all the pins of an '8723 (and in some cases, 2 8723's "lashed" together). I have so many combinations of digital, analog, and serial data that testing is becoming very, very time consuming.
And I have to deal with a lot of external hardware. Like I2C. And I almost always control fans using a PID control loop using the PICs CCP registers to send 158Khz PWM out to a "buck" converter, which is filtered to give pure DC to the fans. I watch the fan tachometers and use that feedback to control the PWM. I have an algorithm that automatically sets up the coefficients for any fan (big or small) that I hook to it. But it seems like I'm always tuning that algorithm.
I also need to process a lot of serial data - often SNMP packets that have to do a large amount of parsing. I use Lantronix XPorts or MatchPorts to do the network "heavy lifting" but long packets still come in over the USART or SPI port. The ability to inject long strings into those ports and watch the execution of the parser would be priceless. Right now, I capture network packets with WireShark and go through long lists, byte-by-byte.
Since I'm dealing with external devices, a lot of things are time-critical as well.
The whole test process takes far too long.
I can't imagine that Proteus could do all of what's needed, but if it could help me with even part of what I'm doing, it would be money well spent. What do you think?
Charles Linquist
Bookmarks