AT-MINI (Atmega328) CANSPI library?

General discussion on mikroC PRO for AVR.
Post Reply
Author
Message
Nikitos
Posts: 40
Joined: 06 May 2015 15:07

AT-MINI (Atmega328) CANSPI library?

#1 Post by Nikitos » 07 Jan 2016 06:51

Hi everyone! Is it possible to use CANSPI library with AT-MINI? I used the same code on Atmega32 and Atmega328(AT-MINI). One Atmega32 everything is working, on Atmega328 not working. I sure 100% that this code is working. Can somebody explain me something about? Or should I buy again something extra to program AT-MINI? Or should I write my own library for it?

There is only one difference. I'm using

Code: Select all

sbit CanSpi_CS            at  PORTC2_bit;
sbit CanSpi_CS_Direction  at  DDC2_bit;
sbit CanSpi_Rst           at  PORTC1_bit;
sbit CanSpi_Rst_Direction at  DDC1_bit;
Not portA or portB.

User avatar
uros.cvetinovic
mikroElektronika team
Posts: 803
Joined: 14 Dec 2015 09:24

Re: AT-MINI (Atmega328) CANSPI library?

#2 Post by uros.cvetinovic » 12 Jan 2016 16:04

Hi,

Have you established your connection right?
You can check AT-MINI schematic to see SPI connections:
http://www.mikroe.com/downloads/get/159 ... l_v102.pdf

If you are using CAN-SPI board check position of onboard sw1 switches for MOSI, MISO and SCK.
Connect CAN-SPI board to MINI-AT with wire jumpers.

You should get it working.

Best regards,

Uros Cvetinovic

Nikitos
Posts: 40
Joined: 06 May 2015 15:07

Re: AT-MINI (Atmega328) CANSPI library?

#3 Post by Nikitos » 22 Jan 2016 06:54

After some days problem solved. Problem was in power supply. I changed supersupply to anotherone and then everething is working.

Post Reply

Return to “mikroC PRO for AVR General”