Menu

arduino 2560 first try

Help
2020-10-04
2020-10-04
  • stan cartwright

    stan cartwright - 2020-10-04

    please help.
    I got these errors on my first compile using arduino 2560 board. Why?

     
  • Anobium

    Anobium - 2020-10-04

    First line of the error report is the clue.....

     
  • stan cartwright

    stan cartwright - 2020-10-04

    What error report? Looks like the errors are in the ili9341 include.
    I'll try real ports instead of digital_x.
    this was my first compile with 2560.

     
  • Anobium

    Anobium - 2020-10-04

    Look again. Canot find something... what cannot not find? What is the chip ?

     
  • stan cartwright

    stan cartwright - 2020-10-04

    Chip is marked as atmega 2560.
    my error sorry. header should have been.

      #chip mega2560, 16
      #option explicit
    
        #include <glcd.h>
        #include <mega2560.h >
    

    glcd not working yet but flashes ok.

     
  • stan cartwright

    stan cartwright - 2020-10-04

    the pins in include atmega2560 don't match the pinout diagram . like mosi,miso

     
  • stan cartwright

    stan cartwright - 2020-10-04

    Which pin is reset?
    it's not a 328p with extra pins as I thought.
    tried this remapping for 2560 from 328p demo but reset pin??

      #chip mega2560, 16
      #option explicit
    
        #include <glcd.h>
        #include <mega2560.h >
    
        #define GLCD_TYPE GLCD_TYPE_ILI9341
    
        'Pin mappings for SPI - this GLCD driver supports Hardware SPI and Software SPI
        #define GLCD_DC       portb.0 ;DIGITAL_8         ' Data command line
        #define GLCD_CS       portb.2 ;DIGITAL_10          ' Chip select line
    ;    #define GLCD_RESET    portb.1 ;DIGITAL_9         ' Reset line
    
        #define GLCD_DI       portb.3 ;DIGITAL_12          ' Data in | MISO    - Not used therefore not really required
        #define GLCD_DO       portb.2 ;DIGITAL_11          ' Data out | MOSI
        #define GLCD_SCK      portb.1 ;DIGITAL_13          ' Clock Line
    
        #define ILI9341_HardwareSPI    ' remove/comment out if you want to use software SPI.
    
     
  • stan cartwright

    stan cartwright - 2020-10-04

    some gcb projects work ok like the nano328p running at 3,3v and the display
    5v driven from 3,3v and dropout doesn't matter
    but the 2560 is a pain even at 5v logic.
    I thought if ports the same and using specific ports for mosi,sck.miso would be ok.
    I used to just tie reset high?? and not use that line.
    Oh the joys of gcb coding
    ps joking.it's not pnp like what I imagine arduino is but never copied a sketch...
    or used it...about time I gave it a go.

     

    Last edit: stan cartwright 2020-10-04
  • stan cartwright

    stan cartwright - 2020-10-04

    When i think using a nano 328p at 3.3v it lowers clock and never considered the impact on wait.

    any considerations about mega2560 I should be aware of please before I put some effort into it? cheers guys

    which pin is reset..bye the way?

     

    Last edit: stan cartwright 2020-10-05

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.