Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

pic16f72 pure sine wave inverter

Status
Not open for further replies.

wissy

Newbie level 6
Newbie level 6
Joined
Feb 25, 2018
Messages
13
Helped
1
Reputation
2
Reaction score
0
Trophy points
1
Activity points
107
admin, please help me with the correct hex file and circuit diagram of the pic16f72 pure sine wave inverter. i have tried the attached but not successful.

thanks.
 

Attachments

  • rk_sin_mod.rar
    42 KB · Views: 398

I built the circuit, loaded the hex file but i discovered that it does not have any data in the program memory and so only code memory is programmed, when it gets to programming program memory it skip it and says program successful but when put into the circuit, it does not come ON.
 

I can't imagine what you mean by distinguishing 'code' memory from 'program' memory. In general both refer to the samething. Anyway, assuming you were successful on writing the hex file into microcontroller, I wonder how did you built the circuit since I did not see any schematic in the above attachment, but only an assembly program containing several misspellings, plus lots of comments '?????' which make anyone to question the reliability of this code. Don't waste your time, do a better search on the Web to find something better documented.
 

i got the code from this platform on thread 4, thread 45, and thread 53 and yet it did not work.
please help me with a c code and circuit diagram for a pure sine wave inverter using pic16f886.
thanks.
 

pic16f72 pure sine wave inverter.

Admin , i have attached the code and diagram i used and yet it does not come ON. Please help me out.
 

Attachments

  • sine_tech_mail.rar
    2.5 MB · Views: 581

Ok, now we have a product design; next step, clarify what is the issue.

First you said that was not able to write the hex code at the MCU.
Now, you say that want to use a MCU other than originally specified.
 

i have two requests. one is that the code and circuit i attached are not working. two is that i need a code and circuit diagram of pure sine wave inverter using pic16f886. pls provide help.

pls help me with the code that will work with the attached design. also provide the c version of the assembly file attached.

i have ten picises of pic16f886. please provide me the pure sine wave inverter circuit and code for the microcontroller
 

    mohsinalom

    Points: 2
    Helpful Answer Positive Rating
For a start, the devices have different amounts of memory (the PIC16f886 has more of both FLASH and RAM) but the way some of the internal devices (e.g. SPI and UART) are implemented is different. Also the capabilities of the timers are close but not the same. Further and based on a quick scan of the data sheets only, the register names are mostly the same, and they have similarly named bits, they may well have slightly different implementations
All this means that you will need to go very carefully in how you translate the PIC16F72 code to the PIC16F886 code - I suspect that much of it will transfer across but you will need to *really* understand what the original code does and check that the outcome (including side effects of the various operations on status bits where these are later checked) in the new processor is equivalent.
Given the questions you are asking, I suspect that this may be a little beyond you at this time.
You might find someone willing to do your job/assignment/whatever this is for you but you are more likely to get help here if you try something yourself (which you describe to us properly) and then ask for help on specific problems you are having (again telling us what you did, what you expected and what you encountered).
Susan
 

thanks but i asked two questions. The first is to give the correct code of my attached file but i have tried the attached but it is not coming ON. The hex file will show programming successful but when i put the microcontroller into the circuit and apply battery power, it does not come ON. I dont get any voltage output on pins 11, 12, 13, 14 repectively with repect to ground.
please what should be the voltage on these pins?
will they read AC or DC?
please help me.
 

thanks but i asked two questions. The first is to give the correct code of my attached file

What makes you think that someone here would have the correct code for a project that you attached without even telling us where you got it from ? With regard to your previous question ("...provide the c version of the assembly..."), it is impracticable; There is no way to convert an Assembly program to C, unless someone does it from scratch.

I dont get any voltage output on pins 11, 12, 13, 14 repectively with repect to ground

I recommend that you study the subject of "power electronics" a bit more before venturing to deal with it, since the answer to the above question is very straightforward: Note that in the schematic circuit there is a clear drawing of the expected waveform, a pulse train (which by the name of the signal is known as PWM).
 

Really the above project of Sine Wave Inverter has got viral. I have seen some guys posted the project on their blog claiming it designed by themselves. Being an electronics hobbyist, I bought the technology from a person who, after getting payment made a long dilly dally and finally mailed the circuit and code. But unfortunately the project did not work. I was totally cheated. However, based on tutorial provided by Tahmid, a member of this forum, and accessing other related articles in the internet, I took up to create a code using mikroC compiler that suits the same circuit. The inverter is working fine. The battery charging function is also fine. I have observed a clear sine waveform at the output which is filtered by 2.5mfd capacitor. Of course, there is an issue of output regulation. I am trying best to overcome the problem. Once it is fixed, I can send you the Hex. code.

NB: Plese see the bootstrap capacitor (C9 & C12) has been shown as 220u which need to be replaced by 4.7u.
 
Last edited:
Thanks Swapan, you can attach what you have now for me, i only need the signals out, the bootstraping will not be a problem.
 

Admin, a got the file on this platform (Thread 4, and 45). that is the reason i took courage to try it.
my second question is if someone can help me with a code written in c that will give a pure wave inverter.
 

I must admit that I'm a little surprised that the programmer let you apply the hex file to the wrong device - most of the programmers I know of check that the physical processor ID matches the one in the hex file. The reason is that registers may have different addresses in different devices etc..
I've done a quick comparison of the register addresses in the two devices you are using and most are the same but the PIC16F886 has registers that will need to be initialised (e.g. WDTCON) that will be ignored in the hex file you are using as they don't exist in the PIC16F72. Worse, while the 'configuration word' is at the same address in both devices, the bit fields do not entirely match which may cause the PIC16F886 to come up in some strange configuration - if it lets the chip run at all.
You really must go back to the assembler source code and recompile that for the correct processor while making the appropriate changes for the different MCUs.
Susan
 

Thanks Susan, my point is being misunderstood, i said i have tried it with the original MCU meant for it but i didnt work. The programming showed successfu but the circuit did not come ON.
My second request is for someone
to help me with a pure sine wave inverter code using pic16f886. i mean a program in c for pure sine wave inverter using pic16f886.
Wissy.
 

If the programming was successful then either the program is wrong, something is missing from the programing (configuration word?) or you have a hardware problem.
Before looking at a complete redesign with a different IC, try to find out why the 16F72 didn't work. How did you put the code into the PIC, what device did you use and if you read it back, does the code match what you wrote to it?

The reason I ask is that on many occasions, we find that only part of the PIC has been programmed. As well as the code that operates the inverter, there are other registers that have to be loaded with appropriate values during the programming process and some software/hardware programmers do not do that automatically.

Re-writing new code in a different language for a different PIC but expecting it to work on the same hardware is a task that would take us several days to do and even then we would need the inverter board to debug and verify it. The members on Edaboard try to be as helpful as possible but to expect someone else to undertake such a lot of work is unreasonable. Please bear in mind that everyone on here is a volunteer helper and we also have other work to earn a living.

Brian.
 
Thanks Brian, if i read from the chip, it matches with the initial code but yet it doesnt work.
secondly, what i need also is a pure inverter circuit code in c using pic16f886. or if possible a working circuit and code any other chip.
Thanks
Wisdom.
 

The original 16F72 code isn't written in assembly language, it is either 'C' or BASIC but the source isn't included in the archive. What is shown as the assembly listing is a decompiled high level code with some comments added.

Please try this: Read the PIC back and save it's contents as a HEX file. Then compare it with the one in the archive. The reason I'm suggesting this is the HEX file normally contains the configuration information but a binary dump may not. Also, some programming equipment, especially 'hobby' type programmers do not program the configuration at all and require you to do it manually. Which programmer do you use?

I still think it would be easier to use the 16F72, even if you have to write new code for it. Using a different PIC will mean you have to modify the PCB to get the same results.

Brian.
 

betwixt has put a clear light on what wissy could focus more attention on.

After looking at the code posted it does look like it was reversed engineered out of the Samtek home UPS product.
digital-home-ups-inverter.png

The source code was built with a very old version of MPLAB that may predate the oldest version (5.40) available on the Microchip web site.

In any case with a little clean up of the source code builds using MPLAB v8.92, but it can be a bit tricky to remember how to turn off the case sensitivity of MPASM from the MPLAB project build options dialog box.

If this is not an academic exercise I would suggest that wissy purchase the Samtek home UPS rather that build a copy of it.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top