Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Oellness

Pages: [1]
1
ATMELTM AT91SAM7X and AVR32 / Re: New Project with own Hardware
« on: February 06, 2010, 11:35:40 AM »
Hi,

on a Scope i see that the Signals from the Data Bus is not a good signal. It seems that the capacity on the lines are to high for the µC speed. it looks like a sawtooth with a period of 1 µs.
Is there a method to run the LCD with a lower speed?

Regards
Volker

2
ATMELTM AT91SAM7X and AVR32 / Re: New Project with own Hardware
« on: February 05, 2010, 08:40:18 AM »
Good Morning!

I'd got the minimal configuration (only Watchdog) working.
Now i want to insert the GLCD because i need the output at the lcd for my analog inputs, so this must be the next step...
Is the configuration of the port pin ok?
The RST Line is at Pin PB28 so i modified the config define...

#define DATA_LINES             (PA26 | PA25 | PA24 | PA23 | PA22 | PA21 | PA20 | PA19)
    #define GLCD_RST               PB28                                  // reset
    #define GLCD_RS                PA29                                  // GLCD Register Select
    #define GLCD_RW                PA28                                  // GLCD Read/Write
    #define GLCD_ENA               PA27                                  // GLCD Enable

    #define GLCD_CS0               PA12                                  // LCD Controller 0 Chip Select - 2 controller chips for 128 x 64
    #define GLCD_CS1               PA13                                  // LCD Controller 1 Chip Select

    #define SET_PULL_DOWNS()       
    #define REMOVE_PULL_DOWNS()   

    #define CONFIGURE_GLCD() \
        _CONFIG_DRIVE_PORT_OUTPUT_VALUE(A, ( GLCD_RS | GLCD_RW | GLCD_ENA | GLCD_CS0 | GLCD_CS1), GLCD_RW ); \
      _CONFIG_DRIVE_PORT_OUTPUT_VALUE(B, GLCD_RST, GLCD_RW ); \
        _CONFIG_PORT_INPUT(A, DATA_LINES);

    #define GLCD_DATAASOUTPUT()    _DRIVE_PORT_OUTPUT(A, DATA_LINES)
    #define GLCD_DATAASINPUT()     _FLOAT_PORT(A, DATA_LINES)

    #define GLCD_DATAOUT(data)     _WRITE_PORT_MASK(A, data, DATA_LINES)
    #define GLCD_DATAIN()          _READ_PORT_MASK(A, DATA_LINES)

    #define GLCD_RS_H()            _SETBITS(A, GLCD_RS)
    #define GLCD_RS_L()            _CLEARBITS(A, GLCD_RS)

    #define GLCD_RW_H()            _SETBITS(A, GLCD_RW)
    #define GLCD_RW_L()            _CLEARBITS(A, GLCD_RW)

    #define GLCD_CS0_H()           _SETBITS(A, GLCD_CS0)
    #define GLCD_CS0_L()           _CLEARBITS(A, GLCD_CS0)

    #define GLCD_CS1_H()           _SETBITS(A, GLCD_CS1)
    #define GLCD_CS1_L()           _CLEARBITS(A, GLCD_CS1)

    #define GLCD_DELAY_WRITE()                                       // no write delay since the data is stable for long enough at full speed
    #define GLCD_DELAY_READ()      GLCD_RW_H()                       // one extra operation to ensure set up time of read

    #define GLCD_RST_H()           _SETBITS(B, GLCD_RST)
    #define GLCD_RST_L()           _CLEARBITS(B, GLCD_RST)

    #define GLCD_ENA_H()           _SETBITS(A, GLCD_ENA)
    #define GLCD_ENA_L()           _CLEARBITS(A, GLCD_ENA)

    #define MAX_GLCD_WRITE_BURST   80                                // the maximum number of writes to the GLCD before the task yields


Should i see the same pictures and text like i see at the simulator ?

Thanks!
Volker

3
ATMELTM AT91SAM7X and AVR32 / New Project with own Hardware
« on: February 04, 2010, 01:46:15 PM »
Hello,

i'm want to start a new project which use my own hardware. So i copied the demo project files and renamed it.
I can run this copied demo project on a AT91SAM7X-EK Board without problems.

Now i want to port the project to my own hardware which is a "modified" AT91SAM7X-EK Board.

My HW has the following peripheral:
- DM9161 PHY connected to the same pins like the AT91SAM7X-EK
- Mono GLCD with 2 KS108 Controller
-- Data Bus at PA19...PA26
-- Enable at PA27
-- R/W at PA28
-- RS at PA29
-- RST at PB28

- 4 LEDs (active LOW) at PA04...PA07
- 6 Buttons at PA14, PB27, PB20...PB23
- 8 GPIO OUTs at PA02, PA03, PA08, PA09, PA15...PA18 to switch Relais
- 1 DS1307
- 1 I2C Multiplexer for Analog Inputs
- 1 PWM OUT at PB29/PWM2
- 5 Analog Inputs at AD3...AD7
- 1 USB

Now i tried to modify the config.h for my project. I change the following:
#if defined _HW_SAM7X
   #define TB_SAM7X
  //#define SAM7X_EVAL                                                   // evaluation board from ATMEL
  //#define OLIMEX_EX256                                                 // low cost evaluation board from Olimex
   #if defined (TB_SAM7X)
      #define TARGET_HW      "TB_SAM7X"
    #elif defined (SAM7X_EVAL)
        #define TARGET_HW       "AT91SAM7X-EK"
    #elif defined (OLIMEX_EX256)
        #define TARGET_HW       "SAM7X-EX256"
    #endif


and disabled MODBUS, Serial Interface, SD-Card support:
//#define USE_MODBUS_SLAVE                                                 // slave capability supported
//#define USE_MODBUS_MASTER                                                // master capabiity supported (either slave or master required)
//#define MODBUS_GATE_WAY_ROUTING                                          // configurable routing from slave gateways (requires master functionality)
//#define MODBUS_GATE_WAY_QUEUE                                            // support queuing of MODBUS transmissions - advisable for gateways
//  #define MODBUS_DELAYED_RESPONSE                           // allow slave parameter interface to delay request responses - for example to prepare latest data from external location
//  #define MAX_QUEUED_REQUEST_LENGTH    8                                 // longest request data length that needs to be saved when requests are delayed

//#define SERIAL_INTERFACE                                                 // enable serial interface driver

//#define SDCARD_SUPPORT                                                   // SD-card interface


I enabled the Mono GLCD with Samsung Controller:
#define SUPPORT_GLCD                                                   // enable the task for interfacing to a graphical LCD
#define _GLCD_SAMSUNG                                            // Samsung controller based display rather than Toshiba


Now in app_hw_sam7x.h i make these changes:

I have no SPI Flash so i disabled it and patch the LCD to my port pins:
//  #define SPI_FLASH_AT45DB321
#define DATA_LINES             (PA26 | PA25 | PA24 | PA23 | PA22 | PA21 | PA20 | PA19)
    #define GLCD_RST               PB28                                  // reset
    #define GLCD_RS                PA29                                  // GLCD Register Select
    #define GLCD_RW                PA28                                  // GLCD Read/Write
    #define GLCD_ENA               PA27                                  // GLCD Enable

    #define GLCD_CS0               PA12                                  // LCD Controller 0 Chip Select - 2 controller chips for 128 x 64
    #define GLCD_CS1               PA13                                  // LCD Controller 1 Chip Select

    #define SET_PULL_DOWNS()       
    #define REMOVE_PULL_DOWNS()   

    #define CONFIGURE_GLCD() \
        _CONFIG_DRIVE_PORT_OUTPUT_VALUE(A, ( GLCD_RS | GLCD_RW | GLCD_ENA | GLCD_CS0 | GLCD_CS1), GLCD_RW ); \
      _CONFIG_DRIVE_PORT_OUTPUT_VALUE(B, GLCD_RST, GLCD_RW ); \
        _CONFIG_PORT_INPUT(A, DATA_LINES);

    #define GLCD_DATAASOUTPUT()    _DRIVE_PORT_OUTPUT(A, DATA_LINES)
    #define GLCD_DATAASINPUT()     _FLOAT_PORT(A, DATA_LINES)

    #define GLCD_DATAOUT(data)     _WRITE_PORT_MASK(A, data, DATA_LINES)
    #define GLCD_DATAIN()          _READ_PORT_MASK(A, DATA_LINES)

    #define GLCD_RS_H()            _SETBITS(A, GLCD_RS)
    #define GLCD_RS_L()            _CLEARBITS(A, GLCD_RS)

    #define GLCD_RW_H()            _SETBITS(A, GLCD_RW)
    #define GLCD_RW_L()            _CLEARBITS(A, GLCD_RW)

    #define GLCD_CS0_H()           _SETBITS(A, GLCD_CS0)
    #define GLCD_CS0_L()           _CLEARBITS(A, GLCD_CS0)

    #define GLCD_CS1_H()           _SETBITS(A, GLCD_CS1)
    #define GLCD_CS1_L()           _CLEARBITS(A, GLCD_CS1)

    #define GLCD_DELAY_WRITE()                                       // no write delay since the data is stable for long enough at full speed
    #define GLCD_DELAY_READ()      GLCD_RW_H()                       // one extra operation to ensure set up time of read

    #define GLCD_RST_H()           _SETBITS(B, GLCD_RST)
    #define GLCD_RST_L()           _CLEARBITS(B, GLCD_RST)

    #define GLCD_ENA_H()           _SETBITS(A, GLCD_ENA)
    #define GLCD_ENA_L()           _CLEARBITS(A, GLCD_ENA)

    #define MAX_GLCD_WRITE_BURST   80                                // the maximum number of writes to the GLCD before the task yields

and defined my own HW:
#if defined (TB_SAM7X)
   #define SHIFT_PORT_TO_BYTE      4
    #define FIRST_USER_PORT         PA04
    #define DEMO_LED_1              (PA04 >> SHIFT_PORT_TO_BYTE)
    #define DEMO_LED_2              (PA05 >> SHIFT_PORT_TO_BYTE)
    #define DEMO_LED_3              (PA06 >> SHIFT_PORT_TO_BYTE)
    #define DEMO_LED_4              (PA07 >> SHIFT_PORT_TO_BYTE)
    #define DEMO_USER_PORTS         (PA04 | PA05 | PA06 | PA07)
    #define TEST_OUTPUT_LED         PA05

    #define BLINK_LED               PA04
    #define BLINK_LED_OUTPUT_STATE  PIO_ODSR_A
    #define BLINK_LED_CLR           PIO_CODR_A
    #define BLINK_LED_SET           PIO_SODR_A

    #define PHY_ADD_31              (PB04 | PB05 | PB06 | PB13 | PB14)   // {7}

    // DAVICON DM9161AE on ATMEL eval board
    // remove pullup on TEST input (MII ERXDV) so that device goes to normal mode
    // remove pullup on RMII input (MII ECOL) so that device uses MII mode
    // drive power down mode to '0'
    // drive PHY address to 0x1f (31)                                    // {7}
    #define DRIVE_PHY_OPTION_LINES() PIO_PUDR_B = (PB15 | PB16); PIO_PER_B = (PB18 | PHY_ADD_31); PIO_OER_B = (PB18 | PHY_ADD_31); PIO_CODR_B = PB18; \
                                     PIO_SODR_B = (PHY_ADD_31);          // {7}

    #define PHY_INTERRUPT           PB26
    #define PHY_IDENTIFIER          0x0181b8a0                           // DAVICON DM9161AE identifier
    #define PHY_MASK                0xfffffff0

    // SMTP settings
    #define SENDERS_EMAIL_ADDRESS             "AT91SAM7X-EK@uTasker.com" // fictional Email address of the board being used
    #define EMAIL_SUBJECT                     "AT91SAM7X-EK Test"        // Email subject
    #define EMAIL_CONTENT                     "Hallo!!\r\nThis is an email message from the AT91SAM7X-EK.\r\nI hope that you have received this test and have fun using the uTasker operating system with integrated TCP/IP stack.\r\r\nRegards your AT91SAM7X-EK!!";


I change also the Timer Test LEds and the Watchdog LED:
#define TIMER_TEST_LED_1            PA06
#define TIMER_TEST_LED_2            PA07

#define CONFIG_TIMER_TEST_LEDS()    PIO_SODR_A = (TIMER_TEST_LED_1 | TIMER_TEST_LED_2); PIO_OER_A = (TIMER_TEST_LED_1 | TIMER_TEST_LED_2); _SIM_PORTS
#define TIMER_TEST_LED_ON()         PIO_CODR_A = (TIMER_TEST_LED_1); _SIM_PORTS
#define TIMER_TEST_LED2_ON()        PIO_CODR_A = (TIMER_TEST_LED_2); _SIM_PORTS
#define TIMER_TEST_LED_OFF()        PIO_SODR_A = (TIMER_TEST_LED_1); _SIM_PORTS
#define TIMER_TEST_LED2_OFF()       PIO_SODR_A = (TIMER_TEST_LED_2); _SIM_PORTS

#ifdef USE_MAINTENANCE
    #define INIT_WATCHDOG_LED()                                          // we let the application configure all LEDs
#else
    #define INIT_WATCHDOG_LED()     _CONFIG_PORT_OUTPUT(A, BLINK_LED)    // {26}
#endif
#if defined SUPPORT_GLCD && defined NOKIA_GLCD_MODE && defined OLIMEX_EX256 // {32}
    #define TOGGLE_WATCHDOG_LED()
#else
    #define TOGGLE_WATCHDOG_LED()   _TOGGLE_PORT(A, BLINK_LED)           // {26} blink the LED, if set as output
#endif


At this time i thought that i can see something on my LCD or see a LED toggle.
But nothing happens....

Have i forgotten something???

Thanks for your help!!

Volker

4
µTasker general / RTC Function without RTC Chip?
« on: January 20, 2010, 01:11:00 PM »
Hello,

is in µTasker a Software Function to use as a RTC with Calendar or must i have a external rtc connect to my system?

Thanks a lot?

Best Regards
Volker

5
µTasker general / Re: Simulator and Win7
« on: January 18, 2010, 09:51:16 PM »
Hi,

i've got it!

I'd forget to reboot.
After a reboot i could choose the loopback adapter and this works fine!
Now i can continue with the tutorial.

Thanks for the help...the next qustion will come soon...;-)

Volker

6
µTasker general / Re: Simulator and Win7
« on: January 18, 2010, 07:43:40 PM »
Hi,

to the points:

1: Wireshark/Winpcap is installed
2: I choose the "NVIDIA nForce MCP Networking Adapter Driver" as the working NIC. I also can choose Microsoft but this don't work, too.
3: The Lan Adapter is connected to my Fritzbox via Patch Cable.
4: I disabled the Firewall
5; I installed the Microsoft Loopback Adapter but i don't know to install a virtual subnet.

I can't ping to the simulator...

7
µTasker general / Simulator and Win7
« on: January 18, 2010, 09:07:25 AM »
Hello,

i'm new with the µTasker Project so i tried the Demo Tutorial for the SAM7X.

I can compile the Simulator with VS2008 and the problem i've got is that i don't get a response if i ping to the simulator.

The IP Address from my PC is 192.168.166.21 with 255.255.255.0
My Fritzbox 7210 IP Address is 192.168.166.1

I change the IP Address in aplication.c in 192.168.166.166 with 255.255.255.0 and the Gateway and DNS Address to 192.168.166.1
I also change the MAC Address to 00 16 27 12 31 23

Now i start the Simulator and choose the NIC from my PC (NIC from NVIDIA Nforce 4 Board) but i don't get a response if i try to ping 192.168.166.166.

Please help me!
Thanks!
Best Reards
Oellness

Pages: [1]