Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

my 8051 setup needs an opinion

Status
Not open for further replies.

mstechca

New Member
So here I am with my microprocessor setup, and NOW things are working perfectly.

Here's the interesting part.

I started with a Datung backlit LCD display (model DV-16110) which is 16 characters long by 1 line. It costed me $15.

The problem with it is that I can't make it go past 8 characters!

Now I switched it to a Hyundai LCD which costs only $10, it has 16 characters and 2 lines. Thankfully, I managed to display what I wanted to display.

It's quite amazing how some things can NOT work, even though they "try" to go with the standards, or are the standards wrong?

My next stop is now communicating my 8051 with my PC through the serial port.

Luckily, I managed to pull off over 15Mhz with a 7555 timer, two 4.7K resistors, and one 4.7pF NPO capacitor, and the LCD still works.

My LCD subroutine has the accumulator go from 255 to 0 between the time the time the EN line begins to go low, and the time it returns high.

I should be able to somehow or another get a decent connection speed. Hopefully I can get 115,200bps.

But when I use my calculator to divide the oscillator speed (15Mhz) by a number between 0 and 255, I eventually get a number that is within 200bps of the wanted speed.

The question is how much tolerance could the microprocessor have, or in other words, how much can I be off of the baud rate without losing any characters, if I used serial port mode 1 (the 8-bit UART mode)?

I will be happy if I can get 115,200bps.
 
With a 555 timer?! <<I think Im having an LSD flashback.>> Fmax is 1MHz for that poor thing. Why/how do you come up with this stuff?!

Tell your 8051 that my opinion is that it needs a long vacation. If your other components need an opinion, tell them the same.
 
mstechca said:
Now I switched it to a Hyundai LCD which costs only $10, it has 16 characters and 2 lines. Thankfully, I managed to display what I wanted to display.

It's quite amazing how some things can NOT work, even though they "try" to go with the standards, or are the standards wrong?

Things generally do what you tell them, and NOT what you actually wanted - it's quite simple, you're not controlling the original LCD correctly, you need to read it's datasheet.

My next stop is now communicating my 8051 with my PC through the serial port.

Luckily, I managed to pull off over 15Mhz with a 7555 timer, two 4.7K resistors, and one 4.7pF NPO capacitor, and the LCD still works.

As usual, what has a 555 got to do with anything?. and as already sugested, 15MHz is way above the maximum for a 555.

My LCD subroutine has the accumulator go from 255 to 0 between the time the time the EN line begins to go low, and the time it returns high.

I should be able to somehow or another get a decent connection speed. Hopefully I can get 115,200bps.

Why do you want so fast?.
 
With a 555 timer?!
a 7555 timer. It is the CMOS version of the 555, and it works at lower voltages too.

Fmax is 1MHz for that poor thing. Why/how do you come up with this stuff?!
I experiment. :wink:
Did anyone tell you that the best way to know something is to use it often?


Tell your 8051 that my opinion is that it needs a long vacation. If your other components need an opinion, tell them the same.
:lol: :lol:
nah. They will keep running smoothly.

Things generally do what you tell them, and NOT what you actually wanted
I don't know about that.

it's quite simple, you're not controlling the original LCD correctly, you need to read it's datasheet.
If I can get it to display wanted text, then I am controlling it properly.
Remember that in my 8051 program, I have delays so that the LCD will work.

As usual, what has a 555 got to do with anything?. and as already sugested, 15MHz is way above the maximum for a 555.

I know some of you will give me a " :shock: " for this, but it acts as the 8051's main clock. (output of 555 is connected to XTAL1 pin)

Why do you want so fast?.
Same reason why people want faster and faster PC's, so that waiting time will be highly reduced.

It might be ridiculous just for LCD routines, but if I decide to implement other things later, like communicating with the PC's serial port, then the speed is useful.

Just think about it.
 
First serial works well around 4% within tolerence. Use a crystal, 11.0592 MHz is good for the 8051. You'll never get the <1MHz 555 to (running at 15MHz) to hold itself stable. Crystals are cheap & available and hook up easily to the 8051 with a couple of caps; with less parts than the 555 requires.

The 8051 has to be the granddaddy of microcontroller, they still use versions of it in everything. There is a plethora of info and schematics on the web and LCD & Serial ports have been desribed ad nauseum.

https://www.pjrc.com/tech/8051/
 

Attachments

  • dev4_lcd2.jpg
    dev4_lcd2.jpg
    31.8 KB · Views: 400
15MHz from a 7555. Ha!
The typical max frequency of a LMC555 is 3MHz.
The max frequency of a TLC555 is 2.1MHz.
How do you know the frequency without using an accurate counter?
 
mistakeca said:
Did anyone tell you that the best way to know something is to use it often?

No, no one ever did. Besides, theres a difference between use and abuse.

Did anyone ever tell you that the best way to learn something properly is to listen? With your vacuous methods, you still wont know how to use a 8051 even when 18f pics are archaic.

Why do you even bother asking someone who is argueably one of the best in his field if you dont heed his advice? And if your bizarre system "works perfectly now," then why are you still having problems with it? .....Perhaps you just havent "used" it enough???
 
I don't want to deny anyone, and I agree that high instability may occur a such a high frequency.

and how did I get 15Mhz?

I used a 555 timer, with 2 4.7K resistors, and a 4.7pF capacitor.

I know it breaks the specifications of a lot of datasheets, but if it works, it works.

William, I Thank you for the answer.
 
Semiconductor manufacturers all use the same circuit to test the 3MHz max frequency of Cmos 555 oscillators:
1) They use 470 and 200 ohm resistors, 14 times less value than your circuit, so their max frequency should be very high.
2) They use 200pF, 43 times higher than your circuit so that stray capacitance doesn't create a capacitive voltage divider and failure to oscillate.

Since your capacitor's value is 43 times less but your resistor values are 14 times more then the max frequency of 3MHz will be 9.2MHz if there wasn't any stray capacitance in your circuit which would make the frequency less.
 

Attachments

  • cmos_555_max_freq.png
    cmos_555_max_freq.png
    14 KB · Views: 353
JFDuval said:
mstechca said:
The problem with it is that I can't make it go past 8 characters!

The majority of 16*1 displays are, in fact, two 8*1 on the same line.

Hence my earlier post

Things generally do what you tell them, and NOT what you actually wanted - it's quite simple, you're not controlling the original LCD correctly, you need to read it's datasheet

But I imagine the chances of him reading the datasheet (and paying any attention to what it says) are pretty remote!.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top