Show Posts
Pages: 1 2 3 [4] 5 6 ... 433
46  Using Arduino / General Electronics / Re: How to use RS232 in that case? on: April 01, 2014, 08:00:40 pm
is every RS232 device communicating the same way (besides the baudrate)? Or are there differences?
There can be extensive differences, including complex communications protocols and data packaging.  In this case, it looks like you're in luck and the interface is very ordinary, and uses plain text for most of the commands.  From the FLIR manual:

An RS-232 terminal or host computer connects to the female DB-9 connector on the Pan-Tilt Unit Controller (PTU-C). The host terminal or computer should be set to 9600 baud, 1 start bit, 8 data bits, 1 stop bit, and no parity. Hardware handshaking and XON/XOFF are not used.

From computer networking, you get the concept of "layering."  At the bottom "physical" layer, you have the allowed voltages levels and such.  This is different between the arduino ("TTL serial") and "real rs232" as used by your PTU, which is why you need that "adaptor" board or chip (the common max232.)
At the next layer you have the "data link layer" which describes the formats of bits and bytes and flowcontrol and stuff.  These happen to be the same for arduino serial ports and the PTU.  Then there are a bunch more layers, which in this case are pretty minimal and amount to "send text commands."  (arguably, the "commands are composed of ascii text strings ending with a delimiter" is a separate layer than "The H command halts all movement.")
47  Using Arduino / Programming Questions / Re: Compiled Code Size Difference on: April 01, 2014, 06:07:42 pm
the serial port over the usb bus is a software implementation in the Arduino.
No, it isn't.
The 32u4-based Arduinos implement "Serial" as a CDC driver on top of the hardware USB peripheral.  I don't know whether you'd want to consider that a "software implementation" or not, but the CDC driver IS significantly larger than the HWSerial driver on top of the UART hardware.
48  Using Arduino / Microcontrollers / Re: Difference between what I have, and the uno (or other Atmega 328 board?) on: March 31, 2014, 04:33:02 pm
It looks like the big difference is that your board doesn't have USB.  It's designed to use an external "FTDI cable", rather than having the USB/Serial conversion built-in.  That could be a bad thing if you don't have a USB/"TTL Serial" cable of some kind; one of the big advantages of Arduino (IMO) was that it would just plug into a modern computer...
49  Using Arduino / Programming Questions / Re: How to disable Arduino Environment's use of Timer0? on: March 31, 2014, 02:30:57 am
Defining main() in your sketch will bypass the arduino initialization, but I don't think it will let you define your own ISR for Timer0 and the  other ISRs implemented by the core.

You can also simply re-initialize the timers after the arduino init() code is done with them, at which point they'll stop doing arduino things; there are several libraries for using the other timers.  You still have the ISR problem.

The timer0 tick is pretty much the center of the Arduino runtime.  If you don't want that, I don't understand why you want ANY of the Arduino core.  (I guess I'm agreeing with PeterH)
50  Using Arduino / General Electronics / Re: Trouble finding SMD 74HC279 on: March 31, 2014, 02:18:17 am
He did say "I'm having trouble locating SMD version of 74HC279 chips" - prefixes and suffixes beyond that are likely to be vendor specific.
51  Using Arduino / Microcontrollers / Re: Help with atmega1284 on: March 31, 2014, 02:08:30 am
void usartInit(unsigned char chBaudRate, int uartNum ){
      UBRR0H = (unsigned char)(chBaudRate>>smiley-cool;
      UBRR0L = (unsigned char)(chBaudRate);
If "chBaudRate" is an unsigned char, then this initialization is not correct.  (actually, it probably works for most common baud rates, but...)  How are  you calling usartInit() ?  (those don't look like the Pololu functions that I can find documentation for...)
52  Using Arduino / Microcontrollers / Re: Strange Optiloader bug? on: March 30, 2014, 08:42:14 pm
Which version of the Arduino IDE, which board are you running optiloader on, and what chip/board is the target?
53  Using Arduino / General Electronics / Re: Help me understand what's going on with the reset circuit in this simulation. on: March 30, 2014, 07:40:38 pm
Um.  Leonardo doesn't have an auto-reset circuit, because it doesn't have a serial port in between the USB and the chip.
The two caps you're looking at in the schematics "near" the reset signal are just bypass caps between +5V and GND.
54  Using Arduino / Programming Questions / Re: array like pointer on the function for get the lenth of array. on: March 28, 2014, 11:26:00 pm
the workarounds for this IDE bug are well known.
In short, put your structure definition and typedefs in a separate .h file, and #include that .h file from your sketch.
55  Development / Suggestions for the Arduino Project / Re: ARDUINO RTOS on: March 28, 2014, 08:08:48 pm
FreeRTOS, NilRTOS, and ChibiOS...
Seeing that questions and discussions of these do not overwhelm the existing forum topics, I don't think we need a new topic.
(RTOS discussion usually happens in the "Other Software Development" forum.)

56  Using Arduino / Programming Questions / Re: array like pointer on the function for get the lenth of array. on: March 28, 2014, 07:55:56 pm
Unlike some other languages, a C array contains NO information about its own length.
The compiler knows the length of arrays (via sizeof()) within the scope of the array definition, but this is lost when you pass the array to other functions (and it becomes a pointer.)   So you have to explicitly send the size, if you need it.  Or use the special termination value.  (and this is why C programs are subject to so many "buffer overflow" attacks.)
57  Using Arduino / Programming Questions / Re: Why does the sketch "BareMinimum" compile to 466 bytes in arduino 1.5.6? on: March 28, 2014, 01:51:25 am
58  Using Arduino / General Electronics / Re: Measuring el. consumption non-contact? on: March 27, 2014, 08:23:14 pm
The usual method for mains AC is a "current transformer" that is placed around one of the AC conductors, and produces an output proportional to the current in the conductor; essentially just like a regular transformer, only with a single turn in the "primary."
59  Using Arduino / Microcontrollers / Re: Atmega 168 And ATmega8 on Arduino UNO on: March 27, 2014, 11:56:44 am
You CAN put a mega8 or mega168 in an Uno board, but you will need to set your BOARD to something other than "Uno."
Probably the existing "Arduino NG or older w/ ATmega8" or "Duemilanove w 168" boards will work, if the chips have the appropriate (older) bootloader;  otherwise you'll need to look through the optiboot instructions and posts to figure out how to modify your boards.txt as appropriate (which, alas, varies somewhat depending on IDE version.)
60  Using Arduino / Programming Questions / Re: Is there a way to set additional c++ compiler options??? on: March 26, 2014, 11:17:56 pm
Is there a good way to use this feature to make temporary changes like the original poster is requesting?
Pages: 1 2 3 [4] 5 6 ... 433