Go to advanced search

by McGregor80
Sat Feb 21, 2015 7:57 pm
Forum: C/C++
Topic: Performance difference on PI2
Replies: 12
Views: 2670

Re: Performance difference on PI2

Are you using the same kernel on both Pi's? (ie. has Raspbian on the B been updated etc.) Are you "exporting" GPIO pins - if so this thread may be relevant: http://www.raspberrypi.org/forums/viewtopic.php?f=44&t=99113 Trev. Thanks but i guess it is not the issue on my application. I wrote it in c a...
by McGregor80
Tue Feb 10, 2015 5:58 pm
Forum: C/C++
Topic: Performance difference on PI2
Replies: 12
Views: 2670

Performance difference on PI2

Hi, I made an application compiled on gcc 4.7. It was made for raspbian 2013.09 (somewhere around this date) installed on RPi B. The application uses I2C, UART, some GPIO. Today i tried to run it on The RPi2 (latest raspbian 2015.01.31). I made some small changes related to DT(device tree) and gpio ...
by McGregor80
Mon Feb 09, 2015 1:58 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: I2c in Raspbian 2015-01-30 on Pi B+
Replies: 3
Views: 828

Re: I2c in Raspbian 2015-01-30 on Pi B+

Are the GPIO also disabled by default?

The application i have usues also the GPIO but it doesn't seem to work.
I suspect that it can be the same issue here. Where i can enable the GPIO?

Is UART also changed?

It seems that i was inactive too long time in the raspberrys development.
by McGregor80
Fri Feb 06, 2015 4:04 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: I2c in Raspbian 2015-01-30 on Pi B+
Replies: 3
Views: 828

Re: I2c in Raspbian 2015-01-30 on Pi B+

Thank you RaTTuS.

That was the issue.
"dtparam=i2c_arm=on" in to the config.txt
and
"i2c_dev" in to the /etc/modules
by McGregor80
Wed Feb 04, 2015 3:11 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: I2c in Raspbian 2015-01-30 on Pi B+
Replies: 3
Views: 828

I2c in Raspbian 2015-01-30 on Pi B+

Hi, I just downloaded the latest Raspbian 2015-01-30 and wanted to run my application which utilizes i2c on Raspberry Pi B+ But there is no I2c device and there is no /etc/modprobe.d/raspi-blacklist.conf file. I added the spi-dev in the /etc/modules but this didn't solve the problem. How do i enable...
by McGregor80
Sat Oct 19, 2013 8:51 pm
Forum: Raspberry Pi OS
Topic: What to remove to minimize Raspbian (no xserver)
Replies: 27
Views: 29910

Re: What to remove to minimize Raspbian (no xserver)

Great! Thanks DeanC

I will have to try it. 656MB is really great result.!
It's a pity that creators of raspbian don't make any minimal images which just boot and allow installation of everything else what is in raspbian full.
by McGregor80
Tue Oct 08, 2013 6:47 am
Forum: Raspberry Pi OS
Topic: What to remove to minimize Raspbian (no xserver)
Replies: 27
Views: 29910

Re: What to remove to minimize Raspbian (no xserver)

Thanks all of you for the input The script looks like this now: df -h rm -rv python_games rm -rv /opt/* rm -rv /usr/share/icons/* rm -rv /usr/games/ rm -rv /usr/share/squeak/ rm -rv /usr/share/sounds/ rm -rv /usr/share/wallpapers rm -rv /usr/share/themes rm -rv /usr/share/kde4 rm -rv /usr/share/imag...
by McGregor80
Wed Oct 02, 2013 11:19 am
Forum: Raspberry Pi OS
Topic: What to remove to minimize Raspbian (no xserver)
Replies: 27
Views: 29910

Re: What to remove to minimize Raspbian (no xserver)

Thaks for the input all of you. SirLagz: Though you might be better off using the raspbian installer that HiFi made up if you want a truly minimal Raspbian install. is the HIFI version always the latest version comparing to ordinary raspbian distribution? Here is what i remove so far: rm -rv python_...
by McGregor80
Mon Sep 30, 2013 9:10 pm
Forum: Raspberry Pi OS
Topic: What to remove to minimize Raspbian (no xserver)
Replies: 27
Views: 29910

What to remove to minimize Raspbian (no xserver)

Hi, I'm writing a script which would strip down raspbian installation. On my raspberry i'm going to use: shell with all the commands and few more from apt-get openssl ssh mc i2c gpio apt-get ! all standard C runtime libraries stdio etc. which means all Xserver stuff, python, graphics, sounds, games,...
by McGregor80
Sun Sep 29, 2013 9:49 pm
Forum: Raspberry Pi OS
Topic: U-boot for Raspberry
Replies: 2
Views: 11350

U-boot for Raspberry

Please help. I'm trying to build an u-boot which will work. I just want to boot from it and go in to u-boot menu without even loading any kernel image. I read some on this page: http://elinux.org/RPi_U-Boot What i did: (of course downloaded and extracted the file https://github.com/gonzoua/u-boot-pi...
by McGregor80
Fri Jul 19, 2013 3:33 pm
Forum: Beginners
Topic: Using PIN17 as UART RTS / alternative GPIO functions
Replies: 12
Views: 13899

Re: Using PIN17 as UART RTS / alternative GPIO functions

You must be rigth jojopi.
I didn't manage to make it run this way. I set the signal manualy as i described in my other post method 3.

http://www.raspberrypi.org/phpBB3/viewt ... 68#p389368

Thanks
by McGregor80
Thu Jul 18, 2013 1:01 pm
Forum: Beginners
Topic: Using PIN17 as UART RTS / alternative GPIO functions
Replies: 12
Views: 13899

Re: Using PIN17 as UART RTS / alternative GPIO functions

In my understanding hardware flow control was automatic (no software/kernel involving) setting and clearing the RTS line which should be connected to DE pin in RS485 converter chip. When data is being sent RTS should be high, otherwise low. And if you look at the specification of the MAX348x there i...
by McGregor80
Thu Jul 18, 2013 9:28 am
Forum: Beginners
Topic: Using PIN17 as UART RTS / alternative GPIO functions
Replies: 12
Views: 13899

Re: Using PIN17 as UART RTS / alternative GPIO functions

Hi I have exactly the same problem. I enable the CTSEN in CR register of the UART. I change the function of GPIO17 to ALT3. I check once more if the values are there and i transmit from uart. The TX signal is there but no change of the pin17 (checked with oscilloscope). However if i clear the RTS bi...
by McGregor80
Wed Jul 17, 2013 3:11 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: UART/RS485 problem with DE signal
Replies: 4
Views: 5424

UART/RS485 problem with DE signal

Hi I'm interfacing from UART to RS485 converter. The biggest issue is that to use such IC UART/RS485 converter it's necessary to use one GPIO pin to choose direction for the IC. So i have one pin GPIO17 which i do TX_EN (high) or RX_EN(low). The the IC is able to transmit or listen via the halfduple...
by McGregor80
Mon Jun 24, 2013 2:14 pm
Forum: General programming discussion
Topic: c code::[email protected] x86 to Raspberry PI
Replies: 5
Views: 4902

Re: c code::[email protected] x86 to Raspberry PI

For all you who had similar problems or want to easy start with compiling from linux. Install ubuntu 12.10 (or higher) and in the ubuntu software center download/install "arm-linux-gnueabi-gcc-4.7". This is cross compilator which works for Rapsberry Pi without any other configuration. just compile a...
by McGregor80
Thu Jun 20, 2013 9:13 pm
Forum: C/C++
Topic: Uart problem on Baudrates higher than 38400
Replies: 4
Views: 3520

Re: Uart problem on Baudrates higher than 38400

Thank you jojopi.

I must have been blind when i read termios.h description.
by McGregor80
Wed Jun 19, 2013 6:10 pm
Forum: C/C++
Topic: Uart problem on Baudrates higher than 38400
Replies: 4
Views: 3520

Re: Uart problem on Baudrates higher than 38400

For all of you who encounter same problem i just write the solution which worked for me. I'm not sure if this was because of my low programming skills but this code didn't work correctly: cfsetispeed(&options,B57600); cfsetospeed(&options,B57600); However if i did like this: tcgetattr(uart0_filestre...
by McGregor80
Tue Jun 18, 2013 1:52 pm
Forum: C/C++
Topic: Uart problem on Baudrates higher than 38400
Replies: 4
Views: 3520

Re: Uart problem on Baudrates higher than 38400

I started to diagnose the problem a bit more precisely: 1. When i place jumper between TX and RX pin i receive exactly the same message i send. No garbage. 2. I connected an oscilloscope to the TX pin of raspberry PI and the diagnosed that the baudrate is changing is correct for 9600, 19200 and 3840...
by McGregor80
Sun Jun 16, 2013 3:18 pm
Forum: Beginners
Topic: autostart and run controll
Replies: 0
Views: 279

autostart and run controll

Hi i wrote simple c application which uses i2c and uart. Now i would like to have it starting every time the raspberry Pi (raspbian) starts. 1. Where to add the path to the binary so it will be starting automatically? How to solve the login problem (you have to login before right?) 2. Is there any w...
by McGregor80
Sun Jun 16, 2013 3:04 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: writing to i2c in C ?
Replies: 4
Views: 13405

Re: writing to i2c in C ?

Hi, I'm trying to access i2c bus from a C code. How can I do for instance something equivalent to this ? $ i2cset -y 1 0x20 0x13 0xFF Thanks ! frikosal. First you have to see the "i2c-0" in the /dev/ directory. If You have it there i recommend to use this example: (complete code). http://elinux.org...
by McGregor80
Mon Jun 03, 2013 10:03 am
Forum: C/C++
Topic: Uart problem on Baudrates higher than 38400
Replies: 4
Views: 3520

Uart problem on Baudrates higher than 38400

Hi Can someone tell me why i can't successfully use baud-rates higher that 38400? I have Docklight (uart sniffer) connected to the uart GPIO 14 &15 at Raspberry Pi B v2 with Raspbian on it. Everything works fine on 9600, 19200, 38400. When i try exactly the same test at 57600 i just get everything w...
by McGregor80
Mon Jun 03, 2013 9:29 am
Forum: General programming discussion
Topic: Problem with raw-reading AUX register
Replies: 8
Views: 1807

Re: Problem with raw-reading AUX register

Hi Maybe post a better description of what you're aiming to achieve - what are you interfacing to, etc. I'm Interfacing with UART/RS485 converter and i have a bus of devices on the RS485 line. It's a halfduplex bus with D+, D- and GND. Selecting direction is done by setting the TX_Enable pin to Low(...
by McGregor80
Tue May 21, 2013 11:13 am
Forum: General programming discussion
Topic: Problem with raw-reading AUX register
Replies: 8
Views: 1807

Re: Problem with raw-reading AUX register

I have to take it back. It works in most cases but i just find out that often it's too slow so i miss half of a message send by other units if they respond instantaneously. Do you have any other ideas? The only thing i can think about is to calculate the delay for the TXenable basing on baudrate and...
by McGregor80
Thu May 16, 2013 5:51 pm
Forum: General programming discussion
Topic: Problem with raw-reading AUX register
Replies: 8
Views: 1807

Re: Problem with raw-reading AUX register

Thanks again Gordon,
The tcdrain() worked exactly as you said.
by McGregor80
Sun May 12, 2013 5:41 pm
Forum: General programming discussion
Topic: Problem with raw-reading AUX register
Replies: 8
Views: 1807

Re: Problem with raw-reading AUX register

Thank You Gordon, I'll try the tcdrain( I didn't had any idea about existence of this function). But just to make me understand what i'm doing wrong can you please explain what i'm missing in reading the registers? Your code maps the register, but you never actually read it. I thought that mmap() do...

Go to advanced search