Show Posts
Pages: [1] 2 3 4
1  Using Arduino / Sensors / Re: ov7670 with both arduino uno and now mega on: September 07, 2014, 11:41:48 pm
Mr Arduino,

Thanks for the tip. I used a 1 byte offset for the qvga(w/yuv422) image with the converter. Yes, the colors came out much better. Still have a little bit of green hue and dark green around certain edges though. I might give this a try another day, thanks again.

-diesel
2  Using Arduino / Sensors / Re: ov7670 with both arduino uno and now mega on: September 05, 2014, 12:52:53 am
Mr Arduino,

I able to get a good "useVga" vga bayerRGB image using your ov7670-no-ram-arduino-uno-master files and your converter. The colors of the image look good. However, I am having some trouble with the qvga and qqva yuv422 images. I am getting the correct # of bytes, 153603 with the qvga(including the RDY..which I remove). I get an sharp image, but the color is off, mostly green. This is using your converter. I have tried the variations of yuv, but still green. After the serial settles in, the green is less, but still contributes significantly to the image(70%). I have a  4.7kohm resistor  terminated to 5V on the i2c lines. I am now using a 74AHCT125 for the 8 mhz from pin 11. Using a uno and ov7670 w/o fifo. I have tried setting the registers differently, no change. Tried re-setting the wiring, no change.  Changed serial speeds, no change. Have you encountered this? Have any pointers? I noticed you had a capacitor in your picture on the 1st page, perhaps I need to add that? Just trying to figure out what is causing the issue, so I can address it.

Thanks,

-diesel
3  Using Arduino / Sensors / Re: ov7670 with both arduino uno and now mega on: August 20, 2014, 11:27:47 pm
Mr Arduino,

Thanks, I finally was a able to get a good image! I think part of my problem was the synchronization of the serial port. It takes a few pics for it to lock in, at least when using Realterm. Thanks again for all the information you provided, it was very helpful in getting this camera to work.

-diesel
4  Using Arduino / Sensors / Re: ov7670 with both arduino uno and now mega on: August 15, 2014, 12:15:03 am
Hello,

I am trying to get Arduino Uno with the OV7670 w/o FIFO to run https://github.com/ComputerNerd/ov7670-no-ram-arduino-uno. I am sending data at 1mbs to the serial port, for vga I get 30720 bytes(taking out the "RDY") statement. I have also tried the other resolutions and get a consistent amount of bytes. Clock is on pin 11, running at 8 mhz, output voltage 3V (going thru a 74HC244..also tried 74LVC245). A4 (SDA) and A5 (SCL) have a 4.7kohm pullup resistor to 3.3V. I also removed the pullups in the twi library. I verified that PLCK has an output signal. All the rest of the connections look good. I am using Realterm to capture the serial data. It writes this data directly to a file. I have tried converting over a "useQvga" image like so:
ffmpeg -f rawvideo -s 320*240 -pix_fmt yuvj422p -i frame0.yuv -f image2 -vcodec png img.png
I get a green screen, nothing that looks like a picture image. I have also used a couple other utilities that I found, but they do not produce an image either. One of which converted the image into grayscale, looks similar to static on tv . So, I am not sure what I am doing wrong here. If anybody can provide some insight I would be interested. By the way, I also tried another camera, similar results.

Also, Mr Arduino, you posted below about your data-converter, I would like the windows binary if you could post it? I am having trouble getting the data-converter to compile on my win 7 machine. I think it is related to a problem with the libpng library. Perhaps your converter would help me produce a good image.

"Yes it is here https://github.com/ComputerNerd/RawCamera-data-converter one thing I was wondering should I release windows binaries with it or not? How many people here use windows here?

Thanks,

-diesel
5  Using Arduino / Programming Questions / Trouble with Serial1 port in SPI mode - Port mapping problem on 2560? on: March 02, 2013, 03:56:53 am
Hello,

I am using a Seeduino Mega 2560 mega. Very similar to Arduino mega 2560, except it has accessible headers for some of the pins that are not accessible on the Arduino mega. I am able to run the 1st serial port(Serial) in SPI mode, but I am having trouble running the 2nd serial port(Serial1) in SPI. I suspect it has to do with the missing port mappings when IDE compiles the code, but I am not sure how to fix. Can somebody give me a hint or lead on how to fix problem? 

Thanks,

-diesel

//Init
UBRR1H = 0;                                   
UCSR1A = _BV (TXC1);               
XCK1_DDR |= (1<<XCK1);                   
UCSR1C = _BV (UMSEL10) | _BV (UMSEL11);
UCSR1B = _BV (TXEN1) | _BV (RXEN1);   
UBRR1H =0;

//Transfer byte
while (!(UCSR1A & _BV (UDRE1)));
UDR1 = _data;
while (!(UCSR1A & _BV (RXC1)));
return UDR1;



6  Using Arduino / Storage / Re: SPI Sram with pointers? on: February 19, 2013, 12:49:59 am
Paul,

I am trying to use the sram with the uip network stack, which uses an a pointer to an internal sram array to compose and parse packets. I would like to use external sram instead.

Pito,

Thanks for the info, sounds interesting, the examples are what I am looking for, but I am not sure how to implement that. Yes, I agree, that would be great to have in the Arduino environment.

Thanks,

-diesel
7  Using Arduino / Storage / SPI Sram with pointers? on: February 17, 2013, 11:14:15 pm
Hello,

I recently received some 23LC1024 chips. They are 5V 1Mbit spi sram chips that I am using with an Arduino 328p. I found a library online that is pretty good http://code.google.com/p/arms22/downloads/detail?name=SPISRAM-001.zip (which I modified for 24 bit addressing). This library is nice in that it lets you address the memory as if it were an array, like myarray[address]=#, however, I was wondering is there another programming technique that I could use to work with the sram as a pointer? Could I overload operators in the library to simulate a pointer type interface? I have read that other Atmel chips have the ability to address external memory as if it were internal, but it doesn't look like this is an option with the 328p. Am I wrong, is it possible to use the XYZ registers to address the memory like a pointer?  

Thanks,

-diesel
8  Using Arduino / Networking, Protocols, and Devices / Re: Setting up the second SPI port on the Arduino Uno on: February 13, 2013, 01:34:47 am
Nick,

Thanks I will give that a try. I confirmed it was xck0 pin not being accessible that was the problem on the arduino mega. Bought a seeduino mega board that has the xck0(pe2) accessible, got spi on uart working on this board.

Another question, can you switch uart line back over to serial mode by just doing Serial.begin(#)? I would think you could. Should you make any other register changes?

Thanks,

-diesel

9  Using Arduino / Networking, Protocols, and Devices / Uart port in SPI mode on Arduino Mega 1280 on: February 08, 2013, 03:12:50 pm
Hello,

I was able to operate the Uart port in SPI mode on the Arduino 328. However, when I try to run on the Arduino Mega 1280, I am unable to get it working. I believe the issue is because xck0 line is not routed to pin 4(or any pin for that matter). In fact, none of the xck# lines are routed to pins. It seems odd that none are routed to pins. Is there a way to access the functionality of these pins from another accessible pin? Could an interrupt be used?

Thanks,

-diesel
10  Using Arduino / Networking, Protocols, and Devices / Re: Setting up the second SPI port on the Arduino Uno on: February 08, 2013, 12:00:15 am
Nick,

OK, I will look around and see if someone has done something like that. Thanks for your help!!

-diesel
11  Using Arduino / Networking, Protocols, and Devices / Re: Setting up the second SPI port on the Arduino Uno on: February 07, 2013, 11:39:10 pm
Nick,

I can start a new post if you like? I think that I have found the problem. XCKO is not mapped to an accessible pin. Ref. http://arduino.cc/en/Hacking/PinMapping2560 (which I believe has the same mapping as the 1280). If you search on XCK, none are mapped to an accessible pin. Are there any options of accessing the function of those pins?

Thanks,

-diesel
12  Using Arduino / Networking, Protocols, and Devices / Re: Setting up the second SPI port on the Arduino Uno on: February 07, 2013, 10:33:20 pm
Nick,

I hooked up the SPI ram, it works on the arudino 328p, which is great, thanks! Unfortunately, I can't get it working on the mega 1280. The registers and bits seem to be the same. I looked over the datasheets for the 328 and the 1280, they both look same w/regards to UART in SPI mode. Do you know what maybe the problem?

Thanks,

-diesel
13  Using Arduino / Networking, Protocols, and Devices / Re: Setting up the second SPI port on the Arduino Uno on: February 07, 2013, 12:50:14 am
Nick,

I put a logic analyzer on both so that you could see. I attached two images, 1st with Uart SPI and 2nd with Arduino std SPI. On the Uart SPI I get 255...255,\r,\n from serial. Nothing but 255 for the array of characters. On the Arduino std SPI I get ->hello there \r\n(although not perfect). The best software serial baud seemed to be 38400, I ranged from 9600-115200( best defined by what I received from Arduino SPI) . I also tried connecting the Arduino up with only 9v power supply, disconnecting usb, I thought that might be giving me interference, no change in output, still 255 from Uart SPI. Any other suggestions? I have a arduino mega 1280, perhaps I could give that a try w/the 2nd hardware serial port. Would I have to change the registers?

Thanks,

-diesel
14  Using Arduino / Networking, Protocols, and Devices / Re: Setting up the second SPI port on the Arduino Uno on: February 06, 2013, 10:08:30 am
Nick,

The plan is to use the secondary spi port to use with SPI ram. First, I want to make sure it is working, so now I am just reading and writting from SoftwareSerial. I am attempting to write and read into the SPI port, which works using the hardware spi.

Thanks, I will give the higher baud rate a try.

-diesel

15  Using Arduino / Networking, Protocols, and Devices / Re: Setting up the second SPI port on the Arduino Uno on: February 06, 2013, 12:12:32 am
Nick,

I was messing around with code trying to get it to work, that is why they were different.

I modified as you suggested, but same output......,......,. I did switch back to my first listed code and noticed for a short period of time it would output ......., .......,  then it went back to hello there. Maybe it is a timing thing? I saw something in the datasheet that it talks about setting up interrupts, are those necessary?

Thanks,

-diesel
Pages: [1] 2 3 4