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.

Pull My Hair out, Optical Tachometer - PIC16F628A

Status
Not open for further replies.
Will do. Going to rebuild the circuit on a pcb using the bus wire I'm getting tonight. I'll include a .1uF metalized poly film cap between the +5/gnd on the pic(pins 5 & 14). I'll also replace the wires as stated on the LCD just to make sure everything is up to par. Then I'll try the suggested hex file.

I'll update with my results. Thanks again.
 
Correct, this is the component side. Well I had this setup laid out on a pcb and all I got what a steady solid top row on the LCD.
i am keenly watching your efforts DustinB for a positive result
the software is OK as I watch it
btw if you have any other LCD, why not try out? or if you have any appliance where 16*2 display can be tested , do it

btw, suppose you turn the pot , is the contrast changing from dark black to 5*7 lighter dots and then becomes white?

As you have many colors, try to use resistor color code for pires according to pin number , like black for 1, red for 2 etc. from 10 on repeat them
it would help you trace the wire easily!!
 
Last edited:
I have another lcd that will be here tomorrow, figured I would want to do something else after this works anyway.

Yes, you can see the contrast change all the white til it's not visible.

I'm getting a 3 color set of wire today and some small labels for now. Going to try and find a 10 color set of wire later on. Next time I will probably design the header connectors in order, such as, GND, R7,R6,R5-R0,+. I've also been reading the EPE pdf files on LCDs to better understand exactly how they work. I don't just want this to work, I want to end up knowing "why" this won't work.

We'll see how it goes.
 
I have another lcd that will be here tomorrow, figured I would want to do something else after this works anyway.

Yes, you can see the contrast change all the white til it's not visible.

I'm getting a 3 color set of wire today and some small labels for now. Going to try and find a 10 color set of wire later on. Next time I will probably design the header connectors in order, such as, GND, R7,R6,R5-R0,+. I've also been reading the EPE pdf files on LCDs to better understand exactly how they work. I don't just want this to work, I want to end up knowing "why" this won't work.

We'll see how it goes.
I like your approach
i always said a serius learner will learn more due to non working rather than what ever he rigs up works nothing to learn, in the early stages of learning
later on you gain experience and designs would obviously work
even discovery failures have been lessons for experts.
but make it fast and don't leave it.
 
Well I got it all setup at the top of the breadboard correctly with the new wires on the lcd. The decoupler caps got rid of the pulsing. However, the lcd is still showing solid black squares.

I know the pic is transmitting data running the dustin1.hex file because the 4 data pins on the lcd are all changing voltage. I'm thinking I may have killed the lcd somehow.

Either way, I'll have another lcd tomorrow to test again with. If that doesn't work then I will try to build a basic pic circuit on a pcb to see if I can get the lcd working. If that option works I will go ahead and build the tachometer pcb.

:rolleyes:
 
Last edited:
Well I got it all setup at the top of the breadboard correctly with the new wires on the lcd. The decoupler caps got rid of the pulsing. However, the lcd is still showing solid black squares.

I know the pic is transmitting data running the dustin1.hex file because the 4 data pins on the lcd are all changing voltage. I'm thinking I may have killed the lcd somehow.

Either way, I'll have another lcd tomorrow to test again with. If that doesn't work then I will try to build a basic pic circuit on a pcb to see if I can get the lcd working. If that option works I will go ahead and build the tachometer pcb.

:rolleyes:
try to improve on the pcb by making the LCD side termination 1:1 wrt LCD pins. then perhaps you can have straight wiring
i shall try to up load a new pcb artwork made with eagle that I use.
 

Attachments

  • dustin bd schem.pdf
    16.7 KB · Views: 201
  • dustin bd compo&#115.pdf
    22.6 KB · Views: 174
  • dustin bd solder&#4.pdf
    13 KB · Views: 252
  • dustin bd bottom&#32.pdf
    13.1 KB · Views: 196
Last edited:
Thank you for posting that Sarma. I'll have to wait on my etching supplies to come in to make this PCB due to the traces going between pins.

This weekend I did however build a basic board with bus wire for just the 7805, pic, resistors, decoupling caps, and header pins. I kept the pins lined up in order. I am still getting the solid black boxes on the top row, even with the 10k pot for contrast adjust. I really don't know what is going on, it does it with both LCD screens so I know one isn't bad. The data pins are still seeing voltage changes so I know the pic is transmitting data. The only thing I can guess is the programming is wrong for the setup. Same pin assignments as I have been using. I guess I'm going to have to try and learn some ASM to see if I can get this thing to work. I don't get it, it should work.
 
hi Dustin,
I have increased the LCD delays in this DustinLED1.hex program.

Also PORTB.7 will flash an LED if the PIC is running OK.
Connect a 300R [approx] resistor from the PORTB.7 pin to an LED, so that the pin drives the LED.
It should flash at about 0.5Sec rate.

Let me know.:)
 

Attachments

  • DustinLED1..txt
    1.2 KB · Views: 183
Hi Eric, I will test it tonight and report back. I've got some 270R matched to some red LED's that I have. Could you upload the basic/asm file, whichever you use? In case it doesn't work I could try some small edits to see if there's any effect. I have an extensive background in programming, just not ASM or basic, I'm sure I could figure it out though.

Thanks!
 
Hi Eric, I will test it tonight and report back. I've got some 270R matched to some red LED's that I have. Could you upload the basic/asm file, whichever you use? In case it doesn't work I could try some small edits to see if there's any effect. I have an extensive background in programming, just not ASM or basic, I'm sure I could figure it out though.

Thanks!

hi,
Oshonsoft Basic file.
 

Attachments

  • DustinLED1..bas
    1.3 KB · Views: 198
Thank you for posting that Sarma. I'll have to wait on my etching supplies to come in to make this PCB due to the traces going between pins.

............ Same pin assignments as I have been using. I guess I'm going to have to try and learn some ASM to see if I can get this thing to work. I don't get it, it should work.
I have now made newer version with 2 jumpers and no traces in between pins
if you need it, i can upload it
 
They look good. What is the switch S1 used for? I will try this layout as soon as I get this LCD figured out, hopefully this week.

Thanks again.
 
They look good. What is the switch S1 used for? I will try this layout as soon as I get this LCD figured out, hopefully this week.

Thanks again.
please see the schematic of PIC at the link you provided. There, it is named as "MEMORY SWITCH"

**broken link removed**
 
Hey Eric, I tested the program last night and still no luck. The LED was blinking though. When testing voltages something weird did happen though. I looked down and noticed the screen was initialized. I was finally able to turn it off and reproduce it. When touching the RS pin with the positive meter probe, with the negative probe not touching anything, the screen will initialize and be blank.

This is crazy, the chip works, everything seems to be hooked up right, LCD will initialize with a little positive voltage on RS from the meter probe. Yet it still doesn't display. I've tried several different schematics, verified all connections, and still nothing but trouble. This really can't be that hard. :mad:
 
Hey Eric, I tested the program last night and still no luck. The LED was blinking though. When testing voltages something weird did happen though. I looked down and noticed the screen was initialized. I was finally able to turn it off and reproduce it. When touching the RS pin with the positive meter probe, with the negative probe not touching anything, the screen will initialize and be blank.

This is crazy, the chip works, everything seems to be hooked up right, LCD will initialize with a little positive voltage on RS from the meter probe. Yet it still doesn't display. I've tried several different schematics, verified all connections, and still nothing but trouble. This really can't be that hard. :mad:

hi dustin,
Dont go mad just yet.:)
The RS pin is connected to PIC pin PORTA.4 which is an open drain [ no internal resistor] thats why the 4.7K is connected to it and the other end of the 4.7K to +5V.
Try reducing the 4K to say about 2.2K.

The effect with a long meter wire is to be expected.???

Are you saying when its initialised you can see characters on the display.
 
No, still no characters. The screen just initializes and goes blank. You can adjust contrast to be sure it's still displaying. At one point I was touching some other pins randomly and actually got some oddball characters to display IE: ($&%_@*). I think this was from the meter seeing the different signals as binary display input.
 
No, still no characters. The screen just initializes and goes blank. You can adjust contrast to be sure it's still displaying. At one point I was touching some other pins randomly and actually got some oddball characters to display IE: ($&%_@*). I think this was from the meter seeing the different signals as binary display input.

hi,
It sounds as though you have an hardware wiring problem on the board to the LCD.?

As you can see the Basic program could not be simpler, as you can see the LED is flasing about 0.5sec so the program is running OK.

Are you using the project board or the PCB for these tests.?


EDIT:
The 4.7K on this picture shows it going to 0V not +5V

AAesp10..gif
 
Last edited:
hi dustin,
Did you see my EDIT regarding the RA4, pin #3, its connected to 0V not +5V.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top