Need Some help porting my code. I dont see the issue with it tho. No errors and no halting just doesnt show anything. The lcd works because i tried it back on the 18F1320 breadboard and even tried another lcd just in case.
Also i changed the delays for 20Mhz. I also changed the A/D stuff. If anyone can lend a hand plz...
The issue is i cant see anything on the LCD not even white bars. Here is my code. (for the PIC18F448)
hi atom,
Is this what you are expecting from the asm.?
Changed part of the LCD init code, also the inverted the LCD Enable.
Had to drop the leftshift before the LCD writes in order to run with the Oshonsoft Sim.
EDIT:
Added main2.asm all changes marked with ++++ , just search, about 10 lines changed.
The delays should be a little longer as you are not using RW DB8 Busy.
thanks a bunch reading it now. Even tho i feel like just keep on using your code
but i feel like im not learning if i do use your code. You understand? So ill will try to make my own code and hope i dont "futz up" lol you get it? lol im tired
hi atom,
What type of project board linking wire are you using.?
If you can get your hands on a few metres of old phone trunking cable, the multicore, tinned single strand type,
it makes excellent linking wire.
Also handy for soldered pcbs.
I see you are using the Analog method for the keypad.
If you ever have to install a long single core security loop with the window/door switches connected in series,
you can add a parallel resistor across each normally closed switch.
By choosing a different value resistor for each switch and using the analog method to detect an open switch
[intruder], its possible by measuring the analog voltage with the PIC to determine which switch in the loop is open.
i think i do: let me try to explain what i think you are saying. Its like have that pad with all the buttons pushed down and when a button let go the voltage goes up and since each have a different resistor i can compare what kind of voltage gain i have and determin which switch was released (opened).
Does that about sum it up? Of course not with the actual pad though with like window and door sensors, Maybe even a smoke alarm.
i think i do: let me try to explain what i think you are saying. Its like have that pad with all the buttons pushed down and when a button let go the voltage goes up and since each have a different resistor i can compare what kind of voltage gain i have and determin which switch was released (opened).
Does that about sum it up? Of course not with the actual pad though with like window and door sensors, Maybe even a smoke alarm.
hi atom,
Rough sketch.
The number of switches can be increased to about 16 if required.
A 0V at the adc input would indicate a cut loop.!
In an actual installation I would add a low value resistor in series with input to the PIC's adc and some filtering. [ cap/zener]
Electrical storms can induce high voltages into a security loop.
Yes exactly how i pictured it... i know this is like a stupid question but... How can i take in lets say a range from 12-17v and convert it to 0-5v? I think its called a level shifter or something. Im just tired and google isnt my friend right now.
Yes exactly how i pictured it... i know this is like a stupid question but... How can i take in lets say a range from 12-17v and convert it to 0-5v? I think its called a level shifter or something. Im just tired and google isnt my friend right now.
hi atom,
If you could accept a rough level shift, you could use a 12V zener connected to a series resistor.
That is the 12VZ to the +12v thru +17v rail and a series resistor to 0V from the anode of the zener.
For greater accuracy and linearity a OPA level shifter is recommended.