[panels] Re: Fwd: Update on problems with programming my controller

  • From: Armin Hinterwirth <ahinterw@xxxxxxxxxxxxxxxx>
  • To: panels@xxxxxxxxxxxxx
  • Date: Wed, 2 Apr 2008 11:04:21 -0700

Hi Nina,

I've had similar problems with trying to use a laptop computer with the panels. I first tried a USB to serial converter, changed the port number in the PControl_init.m and send_serial.m files appropriately, and yet was unable to talk to the controller. I also tried a PCMCIA serial card, but yet again the serial ports I got this way somehow behaved differently than the native one on a desktop computer I'm now using for the system.

There's a piece of code at the end of PControl_init.m that sets up serial communication:

!mode comX:19200,n,8,1
(where X stands for the com port number)

Whenever I ran this line on a computer with a "real" serial port, I got a response that indicated that the port had been set correctly, but with the adapter-ports I remember that something was not right. It was a while ago and I don't remember the details, but the gist of the problem was that I was unable to change the baud rate, data, and parity bit info. It always stuck to a default value that didn't seem to work with the controller. Maybe there are serial port adapters out there that don't have such limitations? I switched to a desktop anyways, so I didn't spend much time on this issue.


Cheers,
Armin




Armin J Hinterwirth
----------------------------------
Graduate Student
Department of Biology
University of Washington
24 Kincaid Hall
Seattle, WA 98195-1800

Tel: (206) 543 7335
email: amphioxus@xxxxxx
http://students.washington.edu/ahinterw/


On Apr 2, 2008, at 5:12 AM, Reiser, Michael wrote:
Hi Nina,

Glad to hear everything is now working. You are exactly correct about turning off the ‘divide by 8’ fuse setting on the Atmega168. This may not be documented elsewhere, so thanks for pointing this out.

If you would like to use an arbitrary serial port number, other than COM1, this should be pretty easy to do. In the \controller folder of the panels Matlab code, edit the files PControl_init.m and send_serial.m. Each contains a single reference to ‘com1’; simply replace this with your desired port number and that should be it (you may need to restart PControl and\or Matlab).

Good luck,

MR


From: panels-bounce@xxxxxxxxxxxxx [mailto:panels- bounce@xxxxxxxxxxxxx] On Behalf Of Nina Vogt
Sent: Wednesday, March 26, 2008 4:28 PM
To: panels@xxxxxxxxxxxxx
Subject: [panels] Fwd: Update on problems with programming my controller

Hi,
This is a follow-up to my mails in December concerning the problems I had with programming my controller board from Mettrix. Unfortunately, the Atmega128 (main controller) could not be addressed. I ended up returning the circuit board to Mettrix and even their attempts did not help. But I now have a new board that works perfectly. Thanks a lot to the many people who tried to help. I also wanted to mention a few other things that I came across. They might be trivial but were not immediately obvious to me. 1. I wanted to run the arena using my labtop and a USB-to-Serial converter. This requires to change the port name to COM1, which was not possible on my labtop as COM1 was already taken by some other obscure device. I finally switched to a desktop computer. 2. For the Atmega168 chip used in the panels, there is a fuse setting "Divide clock internally by 8", which I think is ticked automatically. This has to be turned off, otherwise the panels display 00 but don't go through the start-up routine.
Best wishes,
Nina


Nina Vogt
Desplan lab
Dept. of Biology
New York University


Other related posts: