Trying to inch my way to the finish line w/ a 16F1829.........


Closed Thread
Results 1 to 40 of 68

Hybrid View

  1. #1
    Join Date
    Jun 2009
    Location
    Sc*nthorpe, UK
    Posts
    333


    Did you find this post helpful? Yes | No

    Default Re: Trying to inch my way to the finish line w/ a 16F1829.........

    One difference is that Hardware USART requires an RS-232 driver but software does not. Also with software the pins are not fixed. Just need to take this into account when deciding which to use. Obviously if there is no RS-232 driver available then Hardware USART can not be used. I wonder if this is why he could not get HSERIN to work, could explain the gibberish he got.

  2. #2
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,645


    Did you find this post helpful? Yes | No

    Default Re: Trying to inch my way to the finish line w/ a 16F1829.........

    Might be on to something. I forgot I use a MAX232 in my setup.

    PC side uses more than 5V (12V I think), good thing a PIC can take a beating.

    Robert

  3. #3


    Did you find this post helpful? Yes | No

    Default Re: Trying to inch my way to the finish line w/ a 16F1829.........

    Quote Originally Posted by Demon View Post
    Might be on to something. I forgot I use a MAX232 in my setup.

    PC side uses more than 5V (12V I think), good thing a PIC can take a beating.

    Robert
    Jury's still out on the beating... I toast them at regular intervals doing far less nefarious acts to them.... However, they are, on whole, much cheaper to replace than arduino boards.

    As far as the 12v tho, this 16f1829 chip I'm using now has been a hoss so far. And it started life as a PICAXE20M2. So when I first flashed it, it was with a home-made serial cable with no MAX232 or anything. Just straight out the serial port to the chip, so I think some chips will handle it better than most think...

  4. #4
    Join Date
    Jun 2009
    Location
    Sc*nthorpe, UK
    Posts
    333


    Did you find this post helpful? Yes | No

    Default Re: Trying to inch my way to the finish line w/ a 16F1829.........

    Quote Originally Posted by thasatelliteguy View Post
    Jury's still out on the beating... I toast them at regular intervals doing far less nefarious acts to them.... However, they are, on whole, much cheaper to replace than arduino boards.

    As far as the 12v tho, this 16f1829 chip I'm using now has been a hoss so far. And it started life as a PICAXE20M2. So when I first flashed it, it was with a home-made serial cable with no MAX232 or anything. Just straight out the serial port to the chip, so I think some chips will handle it better than most think...
    Have you a MAX232 connected to the Hardware USART pins?

  5. #5
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,526


    Did you find this post helpful? Yes | No

    Default Re: Trying to inch my way to the finish line w/ a 16F1829.........

    Hi,
    Can I use EUSART over BT HC-05? I would assume not since one is UART and one is EUSART...
    If SEROUT works with the HC-05 then HSEROUT will - as long as you get the polarity and baudrate correct. USART vs EUSART is just a matter of the features available they both do asyncronous serial and they both work with HSERIN/HSEROUT.

    1. I cant use DT's interrupts without corrupting my serin/serout. And I have to assume it'll corrupt hserin/hserout as well.
    That's correct and it's just the nature of the beast basically. It's not a problem, issue or bug, it's just the way the microcontroller works. If it's sitting in a tight software timed loop (which SERIN is) and an interrupt forces it to go and do something else the timing of that tight software loop is thrown off - nothing you can do about that.

    2. I can't use ON INTERRUPT cuz it'll miss pulses during even the shortest waits. This is even worse than #1 since the machine will be lost.
    That's also correct due to the reasons described earlier.

    One difference is that Hardware USART requires an RS-232 driver...
    Well, that depends..... For cabled connection to a PC it's a good idea to use a RS232 tranceiver for several reasons. Normally, the polarity of the USART output on the PIC is inverted in respect to what the PC expects. A typical RS232 tranceivers does two things. It "boosts" the signal voltage leverl so it falls within the specs for a proper RS232 connection and it inverts the signal so the PC can read it correctly.

    Now, since we're talking about a Bluetooth connection here and it does work with SEROUT I probably wouldn't want to put a MAX232 between the PIC and the bluetooth module since it's most likely designed to operate at TTL levels. However, and as has been pointed out before, you need to watch the polarity and make it match whatever you're using with SEROUT. Either invert in in the PIC (if it's got that option) or use an external inverter between the PIC and the Bluetooth module.

    Take a step back, write a small test program just for the HSEROUT/HSERIN part and get that working.

    /Henrik.

  6. #6
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,645


    Did you find this post helpful? Yes | No

    Default Re: Trying to inch my way to the finish line w/ a 16F1829.........

    Quote Originally Posted by EarlyBird2 View Post
    One difference is that Hardware USART requires an RS-232 driver...
    Look what I found.

    http://www.picbasic.co.uk/forum/show...2591#post82591

    Robert

Similar Threads

  1. Replies: 2
    Last Post: - 31st May 2013, 18:19
  2. line truncate...again
    By queenidog in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 12th March 2012, 21:58
  3. Most Users Ever On-Line
    By skimask in forum Off Topic
    Replies: 1
    Last Post: - 26th April 2007, 19:06
  4. 2 Line Chars on a 2 Line LCD
    By Squibcakes in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 16th November 2003, 00:44

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