Is it possibly a Windows XP Pro Problem?
I am have 2 problems. First after trying Hyper Terminal in Windows and RS-232C Lab I can see that I am sending data from the PIC. What these programs show is just the same set of characters and not what they should be. Baud is at 2400, data bits are 8, stop bit is 1, parity is none, flow control is none. I have been trying now for two days so I really need help! I also find that Microcode Studio Plus ICD will not talk to the MAX-232 so not I am completely lost! I thought about a bad cable and if this were so I could not program the PIC. Anyone have any ideas? Thanks, Ed
Re: Is it possibly a Windows XP Pro Problem?
Re: Is it possibly a Windows XP Pro Problem?
Sorry serious brain craps! :D
' Name : HELLOX3.pbp
' Compiler : PICBASIC PRO Compiler 2.6
' Assembler : PM or MPASM
' Target PIC : PIC16F628A or similar 18-pin type compatible with LAB-X3 board
' Hardware : LAB-X3 Experimenter Board
' Oscillator : 4MHz external crystal
' Keywords : SEROUT
' Description : PICBASIC PRO program to send "Hello World" on serial port.
'
Include "modedefs.bas" ' Mode definitions for Serout
Define LOADER_USED 1
Define osc 20
mainloop:
Serout PORTB.3, T2400, ["Hello", 10, 13] ' Display "Hello", next line
Pause 500 ' Wait .5 second
Serout PORTB.3, T2400, ["World", 10, 13, 10, 13] ' Display "World", skip a line
Pause 500 ' Wait .5 second
Goto mainloop ' Do it forever
End
Re: Is it possibly a Windows XP Pro Problem?
Your code looks OK with the exception , I think, that it is PORTB.2 that goes to the MAX232.
If I am wrong on that try the Serial Communicator built into MCS.
Re: Is it possibly a Windows XP Pro Problem?
Thank you and inquiring minds would like to know why B.2?
Isn't Port B.2 the TX-in for the Max 232 on a 16F628A or am I looking for a specific type of port?
Thanks, Ed
Re: Is it possibly a Windows XP Pro Problem?
B.2 is the TX and B.1 is the RX from the 628.
Just a matter of looking at it as out from the PIC and in to the MAX.
Are you up and running now?
Re: Is it possibly a Windows XP Pro Problem?
Hi, no sadly I am not able to get it to work. I am using Microcode Studio plus, MPLAB IDE, and a Picstart Plus programmer. Somewhere within these three I have made the wrong choices and being perfectly honest, not knowing what options to chose. I think it will probably take a phone call to/from someone to go through the setups. Thanks though, Ed
Re: Is it possibly a Windows XP Pro Problem?
Sorry that I could not help.
But a call to MeLabs and a talk with Darrell should fix you up.
Let us know how it goes.
Re: Is it possibly a Windows XP Pro Problem?
I don't think the 628a is capable of writing to its own memory. So I don't think it is possible for you to use a bootloader for that chip. So what happens if you take this out of your code?
Define LOADER_USED 1
Also, you could try out the sample hex file code on MeLabs website (but it is made for the 4 Mhz crystal that comes with the hardware), just to make sure the hardware is working as you thought. http://melabs.com/doclist.htm#X3
When you define the osc, you must use capitals! DEFINE OSC 20. PBP is proably defaulting to 4 mhz.
Also, the MeLabs example program for that hardware uses PortB.2, like Dave mentioned. Here is their example:
Code:
Include "modedefs.bas" ' Mode definitions for Serout
loop: Serout PORTB.2,T2400,["Hello",10,13] ' Display "Hello", next line
Pause 500 ' Wait .5 second
Serout PORTB.2,T2400,["World",10,13,10,13] ' Display "World", skip a line
Pause 500 ' Wait .5 second
Goto loop ' Do it forever
End
Re: Is it possibly a Windows XP Pro Problem?
Hi Ed,
Ok so I gotta ask, is anything working, have you verified the code got in the PIC? Did you preprogram it with the bootloader? Did you get any errors when loading any of the code / bootloader ? What is going on inside my mind right now is I am seeing you define OSC 20, and I am wondering what config fuse got programmed into the chip, HS, XT, or other . . . Will a boot loaded program even run at 20 ? I don't know, as I have NEVER used a bootloader. Those are my thoughts.
HTH
JS
Re: Is it possibly a Windows XP Pro Problem?
Hi All! :D
Turned out that a 10 MHz resonator was installed! Thanks to all!
Sincerely, Ed