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.

Can someone write asm code??

Status
Not open for further replies.

cobra1

New Member
i am working on a little project i found online and it has become a real headache lol..

i have built the circuit, as per schematic, and i have the code from the site. i have programmed the chip, and i get nothing.

i have asked questions and still cant get it to work.

the circuit uses a pic16f628 and displays information on a lcd display with a KS0070B controller/driver

i have checked the circuit over and over and its spot on, so all i can think of it that the code wasnt written for this type of display controller.

does anyone have a hex program that i can use in my circuit to test that the circuit works, i have seen people use these programs that just display "HELLO" but i need a program that uses the same pinouts as my circuit as its not on a breadboard.

hopefully someone can help and i get to keep some of my hair lol

here is a link to the project for the pinouts im using.

GuideCircuit : Free Electronics Circuit on website ; Digital thermostat

cheers
 

cobra1

New Member
Have just been told it might not work due to initialisation delays, could anyone confirm if this is true??
 

Diver300

Well-Known Member
Most Helpful Member
Are you sure that you have actually got the PIC to execute code? I can't see why there is a crystal, as the RC oscillator would be fine.

The DS1820 is not recommended, so you should use the DS18S20. The conversion takes about 100 ms so you should be able to see that with a voltmeter.
 

cobra1

New Member
i am using the DS18S20, i thought i could use the internal oscillator but just built it the way it said.

all im getting is a blank screen, if i try and check voltages from data lines i get voltages of between 1v ond 2.5v, if i try and take the voltage from pin 10 on the pic a load of jargon comes up on the screen
 

kchriste

New Member
Forum Supporter
Do you have the data sheet for the LCD controller you are using? Could you post it, or a link to it, here? What programmer did you use to program the PIC?
Does the circuit have a capacitor (0.1uF or so) between pins 14 and 5 of the PIC? I don't see it in the schematic; it should be there for reliability.
.
 

Pommie

Well-Known Member
Most Helpful Member
How are you setting the config value in your pic? If you are doing it with your programmer, what are you setting it to?

As already mentioned, the pinout of the LCD is also important. I have two LCDs that look the same but one has to be orientated with the pins at the bottom. Most other LCD have the pins at the top.

Mike.
 

ericgibbs

Well-Known Member
Most Helpful Member
the pinouts are all correct, all that can be wrong now is code

hi cobra,
Ref your PM.

I ran the asm code from that link for the Thermometer project on my Oshonsoft Sim.
The program displays the startup labels OK on the Sim, see the image.

I'll look thru the KS00708 lcd, IIRC its the same setup as the HD44780.
 

Attachments

  • AAesp02.gif
    AAesp02.gif
    22.8 KB · Views: 194

Mr RB

Well-Known Member
Aren't you the same guy that got Boncuk to design your whole PCB for you because you "lost patience in the end" and now you want someone to write/debug the asm code?

I haven't seen any sign that you've done anything... You got someone to design your PCB based on a schematic from a web link, and now the code you want people to debug for you is based on another web link....

Have you actually done anything at all yourself?? :(
 

cobra1

New Member
yes im that guy, i probably havnt yet done much myself apart from build the circuit from the internet, and also find other bits that needed to go on it and combine the 3 circuits.

once the code in the circuit works, i can then learn how it works and do some work myself.

it has been suggested that the program is not starting, i have a logic probe now, what should i look for to see if it is started.

please bear in mind im learning here, so i appologise for the questions
 

ericgibbs

Well-Known Member
Most Helpful Member
yes im that guy, i probably havnt yet done much myself apart from build the circuit from the internet, and also find other bits that needed to go on it and combine the 3 circuits.

once the code in the circuit works, i can then learn how it works and do some work myself.

it has been suggested that the program is not starting, i have a logic probe now, what should i look for to see if it is started.

please bear in mind im learning here, so i appologise for the questions

cobra,
You asked me to help in your PM, so was my earlier posted result of testing the program for you, a waste of time.:)

I assume you did read it.
 

cobra1

New Member
hi eric, your post was not a waste of time no, it does confirm that the code works for the type of lcd im using.

i am not sure at all where i have gone wrong, if the code simulator says it works then i suppose it should work in reality, but it doesnt.

i have all the pins wired correctly, the only thing that im not 100% sure on is the fuses.

i have oscilator set to XT
and i have fuses eneabled for MCLR and LVP

i have also tried BODEN both ON and OFF

i am using a homemade lvp serial programmer icsp connections.

i have confirmed that it can program code and work on this chip as i had it programmed to make an led blink on and off and it worked.

are these fuse settings correct?? or am i missing something.

how can i check to see if the prgram in the chip is running??
 

cobra1

New Member
i have gone over all my solder connections and checked the circuit again, the screen has now entered 2 line mode, which from what i have read means the screen is initialized and waiting for data.

however im still getting nothing on the screen. is it possible for the prgram to start and then stop after the lcd initialises???
 

kchriste

New Member
Forum Supporter
Have you tried adjusting the contrast POT?
 

be80be

Well-Known Member
You LVP the chip are you pulling pgm low to vss
You no you can't use that pin the pgm if it gos high it reset the chip for programming
 
Last edited:

be80be

Well-Known Member
hi eric, your post was not a waste of time no, it does confirm that the code works for the type of lcd im using.

i am not sure at all where i have gone wrong, if the code simulator says it works then i suppose it should work in reality, but it doesnt.

i have all the pins wired correctly, the only thing that im not 100% sure on is the fuses.

i have oscilator set to XT
and i have fuses eneabled for MCLR and LVP

i have also tried BODEN both ON and OFF

i am using a homemade lvp serial programmer icsp connections.

i have confirmed that it can program code and work on this chip as i had it programmed to make an led blink on and off and it worked.

are these fuse settings correct?? or am i missing something.

how can i check to see if the prgram in the chip is running??

t
The part in red is why your lcd is not working you can't use RB4 pgm
 

kchriste

New Member
Forum Supporter
He won't be able to turn off LVP with a LVP programmer.
 
Status
Not open for further replies.

EE World Online Articles

Loading
Top