PDA

View Full Version : 12f675 internal osc question.....



Gabe@SPdFtsh
- 5th January 2004, 05:23
Hello. I am new to the forum and PBP. I am trying to get my 12f675 to drive an SGX-12032 using the internal osc. I was wondering if the problem I am having is with the program, my internal osc, or my cheapness (associated with the internal osc issue, hehehe).

I have the display working with the computer serial out program, just not with the PIC.

My program to get the backlight to turn on, I used the serout2 to try and compensate for any timing diff that may be there. The regular serout didn't work. 14 turns the display on. 2400 baud, 8bits, no parity & 1 stop bit. Please help....


TRISIO = 9
ANSEL = 0
CMCON = 7

bval VAR WORD
p1 VAR BYTE


bval = 350
p1 = 0

loop:
SerOut2 GPIO.2,bval,p1,[14,DEC 14,HEX 14, "14","hi"]
Pause 200

bval = bval + 1


IF bval = 415 Then newpace


GoTo loop

newpace: p1 = p1 + 1
bval = 350

GoTo loop

Gabe@SPdFtsh
- 5th January 2004, 19:29
I figured the baud rate issue, the switch on the 12032 was defective. I used the serial out of my comp at 2400 (instead of 9600) and the display wouldn't recieve. I used a jumper to short the leads of the DIP switch and it recieved just fine from my computer.

Now, my problem is the display won't respond to items of the serout2 unless they're enclosed in quotations and the few letters I've got to show are totally off from what I sent out. For example:

"w" = 3
"12" = g3
"13" = gf
"1" = g
"9" = c
"f" = &

A few that I've tried. For every letter I've put in the item section in quotes, a different one comes out.

Any ideas?????

Thanks...

Gabe@SPdFtsh
- 6th January 2004, 07:33
Thanks for all who've read. I've got everything working with the internal OSC!!!!!!!!! Now, to finish my project. I'll keep you posted.....