Max Array Size?


Closed Thread
Results 1 to 15 of 15

Thread: Max Array Size?

Hybrid View

  1. #1
    Join Date
    May 2013
    Location
    australia
    Posts
    2,655


    Did you find this post helpful? Yes | No

    Default Re: Max Array Size?

    my C version does a lot of that but not all . since there was so little interest in a pbp version I left it pretty basic

    C header

    Code:
    /* 
     * File:   ks0108 driver  21/4/18  20 pin ver
     * Author: rc
     * Comments: ver 1.00
     * Revision history: 
     * pins gCS1,gCS2,gRS,gRW,gRST,gE  all defined in mcc files
     * see user defines  for data bus and frame buffer
     */
    
    // This is a guard condition so that contents of this file are not included
    // more than once.  
    #ifndef XC_HEADER_TEMPLATE_H
    #define	XC_HEADER_TEMPLATE_H
    
    #include <xc.h> // include processor files - each processor file is guarded.  
    #include "mcc_generated_files/mcc.h"
    #include <stdlib.h>
    //#include <string.h>
    #include "font1.h"
    
    #define cs_on  1
    #define cs_off 0
    #define Out 0
    #define In 255
    #define bitset(var, bitno) ((var) |= 1UL << (bitno))
    #define bitclr(var, bitno) ((var) &= ~(1UL << (bitno)))
    
    //user defines
    #define gPort  PORTC
    #define gLat   LATC
    #define gDir   TRISC
    #define USE_FRAME_BUFFER 1
    
    void GlcdInit(void);
    void GlcdBox(char gx, char gy, char gw, char gh);
    void GlcdHline(char gx, char gy, char gw);
    void GlcdVline(char gx, char gy, char gh);
    void GlcdPixel(char gx, char gy);
    void GlcdSetxy(char gx, char gy);
    void GlcdCls();
    void GlcdCircle(char x, char y, char r);
    void GlcdLine(char x0, char y0, char x1, char y1);
    void GlcdClrxy(char x0, char y0, char x1, char y1);
    void GlcdChr(char x, char y, char ch);
    void GlcdStr(char x, char y, char * dat);
    void GlcdBitmap(char x,char y,char w,char h,const char *bm);
    
    
    char gread_byte();
    char gread_data();
    void gcmd_byte(char db, char rs);
    const char gMSK[]= {0,1,3,7,0xf,0x1f,0x3f,0x7f};
    char gMODE=0;  //  0 normal 255 inverse 1 xor function
    
    // frame buffer functions
    #ifdef USE_FRAME_BUFFER
    char gFrame[1024];
    void gUpdate();
    void gScrollL();
    void gScrollR();
    #endif
    
    
    
    #ifdef	__cplusplus
    extern "C" {
    #endif /* __cplusplus */
    
        // TODO If C++ is being used, regular C code needs function names to have C 
        // linkage so the functions can be used by the c code. 
    
    #ifdef	__cplusplus
    }
    #endif /* __cplusplus */
    
    #endif	/* XC_HEADER_TEMPLATE_H */
    Warning I'm not a teacher

  2. #2
    Join Date
    Aug 2003
    Posts
    985


    Did you find this post helpful? Yes | No

    Default Re: Max Array Size?

    It’s enough for me not to bother.
    I’m studying now, and can’t do anything real committing where time spent on it could spiral out of control,
    so I’ve been sniffing for a short kind of project.

Similar Threads

  1. Is it possible to have determine array size in runtime
    By MajidF in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 21st March 2016, 16:52
  2. PIC16 Max Array Size
    By MikeWinston in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 25th February 2012, 17:30
  3. EasyHID max usb buffer size
    By jizyjuice in forum USB
    Replies: 4
    Last Post: - 29th November 2007, 05:12
  4. PIC18F4515 Serin2 Maximum Array size
    By millersamsr in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 6th April 2007, 00:29
  5. Word array behaving like byte array.... wierd
    By forgie in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 2nd August 2005, 15:43

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