help with PIC 16f877


Closed Thread
Results 1 to 13 of 13

Hybrid View

  1. #1
    Depot1's Avatar
    Depot1 Guest


    Did you find this post helpful? Yes | No

    Default Help with subscribe picbasic list

    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

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    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...
    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
    this will gives you a better error % (0.16% against ~7% with 20h)

    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.

  3. #3
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    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.

Similar Threads

  1. SPI Communication between two pic 16f877
    By anti83 in forum Serial
    Replies: 1
    Last Post: - 5th July 2008, 22:06
  2. serial communication between CMUcam and PIC 16F877
    By gengkeys in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 30th March 2007, 07:43
  3. pic 16f877 iel kayan yazı
    By bedir in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 14th January 2007, 08:10
  4. Use the PIC 16f877 or 877A instead of shift registers.
    By tsanders in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 27th October 2006, 18:23
  5. Serial Pic to Pic using HSER
    By Chadhammer in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 12th March 2005, 00:14

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts