Redirecting serial data at runtime


Closed Thread
Results 1 to 21 of 21

Hybrid View

  1. #1
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107

    Default Redirecting serial data at runtime

    I wrote an enormous program that has an awful lot of RS-232 text out (and user response IN). Now I need to send and receive that data to the second (hardware) serial port - sometimes. I can't possibly have double the number of routines for I/O (one for HSERIN1/HSEROUT1 and another set for HSERIN2/HSEROUT2) ,the extra code wouldn't fit. I'm using an '8723.

    I'm pondering trying to write a new assy routine with the function of HSERINx/HSEROUTx where "x" is the port I want to send/receive data from at the moment. Before I even attemp such a feat, I was wondering if anyone else has tried this or knows a simple way.
    Charles Linquist

  2. #2
    Join Date
    May 2007
    Posts
    604


    Did you find this post helpful? Yes | No

    Default

    Wow, that is some application to have used up 128K device. The largest app that I have managed ended up being just under 36K. It include a 240x128 GLCD, touchscreen, 4x4 keypad, SD card storage with FAT filesystem, UART comms, etc.

  3. #3
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default

    Yes, I have been "up against the wall" program space wise for quite a while. I have been begging MChip for a 256K part - because I could really use it. No luck so far.
    Charles Linquist

  4. #4
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Hi Charles,
    Would it work to use 2 PICs, one to run the program and the other as a display server, where it only has to fetch from program space or eeprom the strings and display them ? At least you would get your 256k. You could drive them both from and EXT OSC so they would clock together.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  5. #5
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default

    It would work - but it would require a lot of recoding. Unfortunately, my code doesn't have the outgoing strings in arrays. That would make life a lot easier and I should do that some day.

    I have managed to compact the code to fit in 119K. Believe it or not, that gives me a fair amount of "breathing room", since all the little code blocks have been written, and now I can just call them up when I need something new.

    If I could just get that elusive "Hserinx/Hseroutx" routine running it would solve a whole bunch of trouble. It looks like I'm going to have to modify PBPPIC18.LIB - AGAIN!
    Charles Linquist

  6. #6
    Join Date
    May 2007
    Posts
    604


    Did you find this post helpful? Yes | No

    Default

    I don't think you will ever see anything larger than 128K (they do go up to 256k with the 24-bit core) in a PIC18. Probably has to do with die size. Since you are using a 80-pin device, could you possibly use external program memory in the extended microcontroller mode to get up to 2MB of program space?

Similar Threads

  1. Using Nokia LCD
    By BobP in forum mel PIC BASIC Pro
    Replies: 300
    Last Post: - 3rd May 2018, 04:47
  2. Read/Write Problem
    By Tobias in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 10th February 2010, 01:51
  3. Big characters on HD44780 4x20
    By erpalma in forum mel PIC BASIC Pro
    Replies: 23
    Last Post: - 7th January 2007, 02:21
  4. LCD + bar graph
    By DynamoBen in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 5th October 2005, 14:50
  5. Sinus calculating !
    By Don Mario in forum mel PIC BASIC Pro
    Replies: 29
    Last Post: - 28th November 2004, 23:56

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