AT89C2051 frequency counter

Status
Not open for further replies.

Vlad.

Full Member level 3
Joined
Jun 4, 2012
Messages
179
Helped
3
Reputation
6
Reaction score
4
Trophy points
1,298
Location
Bucharest/Romania
Visit site
Activity points
2,568
hello, i want to make a frequency counter to measure frequency in my smps project, i have this uc recovered from a digital sistem audio5.1. somebody told me that he have activated same lock bits, Can somebody please help me with a schematic and hex file for this project?
 

thanks a lot man, can a measure with this the frecquency of my apartament source (230v AC)? or the frecquecny in smps`s?
 

Of course. But you have to minimize this high potential to a limit so that the microcontroller can be safely operate. May be as low as 5 volt without changing the frequency.
 

You can use a very small transformer, pcb soldering type. Or by resistors. I am not sure about resistor b'cause I have never tried this before.
 

but with the original schematic, no other component what is the max amplitude of the signal that can I measure safety the frequency?î
 

In the 89c2051 datasheet, it is written in page 36, under Absolute Maximum Ratings article, the Voltage on Any Pin with Respect to Ground is -0.7V to +6.2V. I think this is the limit.
 

Last edited:

Hahaha... :lol:
Dear Vlad, you can use that circuit given by tpetar. In fact, this circuit can save your uC from any high voltage spikes.
 


Vlad my friend, you can just erase uC and write firmware again.

Simplest programmer for 89C2051 is called BlowIt and work on LPT port. For running on WinXP use software BASCOM-8051. Programmer have one bad thing he cannot read firmware from uC, only is capable to write and erase. Power supply 12V and 5V get from PC or from external lab PC PSU. If go with cable use LPT cable up to 0,5m max.



For this programmer you must enable LPT port in BIOS if disabled and set LPT port in standard mode (SPP mode), and in BASCOM software must give 1000ms delay :



Use BIN files. Convert HEX to BIN with HEX2BIN tool.
If you have problem remove C1 capacitor.

Programming in BASCOM:
==================
Start BASCOM-8051
Go to menu "Program"
Choose "Send to chip" option
Choose "Buffer" menu in new window
Read from disk (open BIN file)
Write to chip




:wink:
 
Last edited:

hey i download a hex o bin tool but i can make it binary because the dos windows dissaper verry fast
this is the hex
 

Attachments

  • FreqCounter.rar
    634 bytes · Views: 85

i have this error

i put he hex file in the local Disk D to make the comand easy but don`t work

- - - Updated - - -

can you create me a bin file from hex file? please
 

Vlad my friend I see lack of DOS knowledge.

Attach HEX file in post, I will convert it for you, or you can do it just remove one .hex from first file and .hex from second file:

hex2bin fisier.hex fisier.bin
 

HEX2BIN is old tool and recognize only old DOS format 8.3 (8 characters for name and 3 for extension), and file is formated with extended format up to 255 characters "FreqCounter.hex".

to use long names in 8.3 format syntax is "freqco~1.hex".

HEX2BIN freqco~1.hex f.bin

Converted file is :
 

Attachments

  • F.RAR
    451 bytes · Views: 87

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…