the pic basic list
has been around for long time
they have lots of knowledge
but when send email
Subscribe picbasic-l
i get no responce
please help
the pic basic list
has been around for long time
they have lots of knowledge
but when send email
Subscribe picbasic-l
i get no responce
please help
i'm not going trough the Qbasic code since it's really far in my mind but to do a efficient 9600 bauds comm with a 4MHZ crystal you should redefine you USART like...
this will gives you a better error % (0.16% against ~7% with 20h)Code:DEFINE HSER_RCSTA 90h 'set port to input DEFINE HSER_TXSTA 24h 'set port to output <=== BRGH=1 DEFINE HSER_BAUD 9600 'set baud rate
Another method to check you serial communication will be to use the serial communication windows of MicroCode Studio. Easy to use, work really good and there's one free version
Download here
Once you're sure that your serial communication work.. do your VB or Qbasic code
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
I'd like to add that if your instructor has set you a project, then it's unfair to come on the forum and ask for a solution. Start by reading your PICBasic manual and your QBASIC manual. You'll have learnt nothing if we gave you all the answers. In the case of Depot1 (who's obviously on the same course), take a look at your comments and compare with your code - they don't even match... just a few examples...
DEFINE OSC 4 'for 20mhz pic ... really? So the number 4 means 20MHz?
Pause 50 'Delay for .5 seconds ... close but no cigar!
HSerin [B0] ... and you wonder why your PIC is hanging...
Open communications (2400 baud, no parity, 8-bit data,
' 1 stop bit,
OPEN "COM1:9600,N,8,1,CD0,CS0,DS0,OP0" FOR RANDOM AS #1
Well, is it supposed to be 2400 or 9600 ?
Did you write this or copy it from someone? If we help you graduate, how long would you last when you got a real job.
Read the Manuals... and compare the commands to what you've written (or copied). Please guys, no Private Messages, I'm not going to do your homework or sit your exams for you.
Bookmarks